3 ms·
It sounds "reasonable", but no compiler in existence seems to be able to do it efficiently. This suggests to me that it isn't in fact reasonable, as that sound
by DarkShikari 15y ago
It sounds "reasonable", but no compiler in existence seems to be able to do it efficiently. This suggests to me that it isn't in fact reasonable, as that sounds like a more reasonable conclusion than "everyone writing compilers is incompetent".
- scott_s 15y agoI think it's more that the application of it is niche enough that it's not worth the engineering effort for most general purpose compilers - the people who need it are often experts anyway, and are willing to do the optimization by hand. I see this as being similar to why we're only now taking abstractions and compilers geared towards parallelism seriously for mainstream programming: not enough people needed it to justify the effort required.
- serialx 15y agoI think differently. Normal C loop codes are hard to optimize using SIMD as the context and it's freedom can be the limiting factor. But in python, the vector operations are normally programmed using simple array semantics. For example in NumPy: >>> a = array( [2,3,4] ) >>> b = array( [2,3,4] ) >>> a+b [4,6,8] These can be easily converted into SIMD operations. It's matter of time before PyPy's new NumPy implementation take traction and make simply beautiful optimizing JITs using that.