|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re^3: Weird performance issue with Strawberries and Inline::Cby syphilis (Archbishop) |
| on Oct 13, 2025 at 02:53 UTC ( [id://11166490]=note: print w/replies, xml ) | Need Help?? |
|
From looking at godbolt gcc 8.3.0 optimizes that branch into the conditional expression while 13.2.0 doesn't Going back through my own builds of perl on Windows, I can see that the rot goes back as far as gcc-10. I don't know if gcc-9 was afflicted with this same issue as I don't have a perl that was built with gcc-9. Incidentally, things are much better with perl-5.42.0 built using Microsoft's Visual Studio 2022: (Well done, them ;-) BTW, the OP will probably be able to use gcc-8.3.0 to build the script, and reap the benefits of the better optimization capabilities provided by gcc-8.3.0. I inserted the following just prior to the "use Inline C => << 'END_OF_C';" in the OP's script. That worked fine for me on my build of perl-5.42.0, using gcc-15.1.0: Without that modification, the output was: UPDATE: I tried that same hack of using gcc.exe version 8.3.0 with current blead (built using gcc-15.2.0) and it failed with:
It's a bit more fickle than I thought. The hacked script works fine for my own build of perl-5.42.0, but not for Strawberry's build of perl-5.42.0. (There are small differences between those two builds of 5.42.0, but it would make better sense to me if it was the other way around. Anyway .... whilst I find this to be tantalizingly interesting, it's not massively important.) (If it's going to crash, I would prefer that they let it just do that - rather than forbid something simply because the practice is deemed to be dubious.) Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||