3 ms·
That qsort example is getting tedious. I wonder why restrict keyword is never mentioned when talking about C++'s performance advantages over C - it can offer a
by kgabis 12y ago
That qsort example is getting tedious. I wonder why restrict keyword is never mentioned when talking about C++'s performance advantages over C - it can offer a huge boost on modern CPU architectures. I know it's supported by all major compilers, but still - it's not a part of C++'s standard.
- chuckcode 12y agoCompletely agree. Restrict keyword can free up the compiler to vectorize a lot of code with sse and avx on intel chips. [1] http://locklessinc.com/articles/vectorize/ http://locklessinc.com/articles/vectorize/ [2] http://stackoverflow.com/questions/1965487/does-the-restrict-keyword-provide-significant-benefits-in-gcc-g http://stackoverflow.com/questions/1965487/does-the-restrict...