4 ms·
Seems expressive and efficient to me.
by bmacho 3y ago
Seems expressive and efficient to me.
- marginalia_nu 3y agoExpressive, sure. Efficient? Not so much. It's easy to find cases where performing an operation using the streams API comes at a 90% performance hit.
- PhilipRoman 3y agoTSMT Fingers crossed that the upcoming Valhalla project can improve the situation w.r.t. number of allocations. I've noticed a general trend where languages without support for proper compile time metaprogramming (and the corresponding optimizations) often create uglier code (despite being higher level) to avoid the performance hit. For example the mutable Vec2D type in various physics related libraries. Last time I tested it was still faster to implement various string operations using Unsafe, than with standard APIs. I want to be able to trust my compiler/JIT.