Perl: the Markov chain saw | |
PerlMonks |
Re^2: Detecting whether UV fits into an NVby syphilis (Archbishop) |
on Feb 26, 2020 at 05:58 UTC ( [id://11113424]=note: print w/replies, xml ) | Need Help?? |
I'm just looking at the lack of elegance - that's pretty much it.
I've no objection to inelegant code (of which I've written heaps) if it needs to be that way. If not for the portability concerns, I'd pick up on stevieb's suggestion and just have the XSub as : That seems to work fine on MinGW-built Windows perls, where $Config{ivtype} is 'long long', and I'd be happy with that even if it wasn't any more efficient. I didn't know about the existence of __builtin_ctz() and friends. Thanks, stevieb for bringing it to my attention. I'll do some benchmarking later on, and see how much time it saves. It's an option that could come in handy to me in the future. I guess that, mainly, I just want to know if there are some more elegant (&& portable) options available. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|