Re: [eigen] Comma-initializer is quite expensive with compile-time known constants

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]



GCC sometimes has trouble to fully optimize code inside the main
function -- simply renaming your function will give fully optimized code
(I'm not sure whether that is a known issue or a "feature" of GCC).
Also, once you sufficiently tested your code, you should compile with
`-DNDEBUG` to disable assertions.

Comparison:
https://godbolt.org/z/ujpwVU


Thanks a lot, Christoph! Yeah that makes a big difference - I'll be sure to keep that in mind when playing with the compiler explorer, guess I was too quick in my assumptions this time.. 

Best regards,
Ola





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/