Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Efficient code.

by demerphq (Chancellor)
on Jan 30, 2006 at 18:23 UTC ( #526513=note: print w/replies, xml ) Need Help??


in reply to Re^2: Efficient code.
in thread Efficient code.

Juts FYI: In Perl 5.10 alternations not containing regex metachars will not backtrack at all as they are represented by a trie node that can traverse all of the alternations in a single pass. Id say which version of perl contains this but embarrasingly I appear to have forgotten.

---
$world=~s/war/peace/g

Replies are listed 'Best First'.
Re^4: Efficient code.
by Aristotle (Chancellor) on Jan 30, 2006 at 20:56 UTC

    Cool!

    Old geezer moment: sometimes these optimisations make me feel like I did when I was writing assembly code (inner loops of texture mappers slinging pixels… unrolling carefully, rejoicing when a clever trick got your loop down from 11 to 9 cycles per pixel – those were the days) and went from Pentium to PentiumPro – suddenly it was no longer possible to measure how many clock cycles any one instruction took: an innocuous change somewhere up or down the line would sometimes dramatically change the time response of an unrelated instruction, occasionally a loop iteration would randomly take more or less cycles than average, and sometimes instructions would appear to take a fractional amount of cycles. It was like wading through quicksand.

    Of course, there was no way to inspect the result of the PPro’s µ-Op translator. Thank goodness for use re 'debug'; :-)

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://526513]
help
Chatterbox?
[Your Mother]: What a stupid, yet seductive super power. Control of biting insects.
[oiskuu]: Don't you think it's disturbing that the washing machine manual would say not to start it with pets inside?
[oiskuu]: So, how long did it take you to grow up?
[oiskuu]: Have you ever had your temperature taken from the other end?
[marto]: I read about a case where people were at a launderette, or whatever they're called in the US, and as a joke, put their toddler in with the washing, then closed the door
[Your Mother]: (Work in progress.)
[marto]: unaware that the model in question started the cycle automatically, provided the money/token had already been provided

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2017-12-18 14:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (487 votes). Check out past polls.

    Notices?