SIMD/intrinsincs questions

bearophile bearophileHUGS at lycos.com
Tue Nov 10 02:59:18 PST 2009


Walter Bright:

> Modern compilers don't do much better. The point of diminishing returns 
> was clearly reached.

I routinely see D benchmarks that are 2+ times faster with LDC compared to DMD. Today CPUs don't get faster and faster as in the past so a 250% improvement coming just from the compiler is not something you want to ignore. And more optimizations for LLVM are planned (like auto-vectorization, better inlining of function pointers, better de-virtualization and inlining of virtual class methods, partial compilation, super compilation of tiny chunks of code, and quite more).

Another thing to take in account is that today you usually don't want to compile just C; you want to compile Java, C#, Scala, Haskell, JavaScript, Python, Fortress, etc. Such higher level languages offer challenges to the optimizators, that were not present in the past. For example most optimizations done by the Just-In-Time compiler for Lua were not needed by a C compiler. Today there are many people that want to program in Lua or Python or JavaScript instead of C, so they need a quite more refined optimizer and compiler, like the LuaJIT2 or Unladen Swallow or V8. You also have new smaller challenges created by multi-core CPUs and languages that are functional, immutable-based.

That's why modern compilers are quickly improving today too, and today we need still such improvements.

Bye,
bearophile



More information about the Digitalmars-d mailing list