[Solved] Linux C++ new operator incredibly slow [closed]

Given that 98% of the time is spent in that function, I rewrote your “get a number” function: int Ten_To_One_Million_Ten(void) { unsigned Number = (((unsigned)rand() << 5) + (unsigned)rand()%32) % 1000000 + 10; assert(Number >= 10 && Number <= 1000010); return Number; } Now, on my machine, using clang++ (Version 3.7 from about 4 weeks … Read more