Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^6: Syntax error makes perl hang

by cfreak (Chaplain)
on Aug 16, 2005 at 14:07 UTC ( [id://484155]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Syntax error makes perl hang
in thread Syntax error makes perl hang

Except that 'aa' ..'aaaaaaaa' which works is a bigger array than 'pfo' .. 'pctpfo', unless I'm completely misunderstanding how it increments them. I'm guessing there is some kind of optimization in that case? ... Either way why does Perl still allocate the memory during the -c check? (my machine crashed while using -c)

If it is just the size I suppose there's not a bug per se, but it would be nice if there was some kind of brake to keep Perl from running away with all the memory. I still say there is a bug though, at the very least -c shouldn't allocate the memory.

Replies are listed 'Best First'.
Re^7: Syntax error makes perl hang
by Ven'Tatsu (Deacon) on Aug 16, 2005 at 18:40 UTC
    perl attempts some basic optimisations during the compile phase. One of which is to precalculate constant lists. Since both arguments to the range operator are constant the list it produces will be constant and can be precomputed.
Re^7: Syntax error makes perl hang
by gellyfish (Monsignor) on Aug 16, 2005 at 18:55 UTC

    Well I was going to try this out and give some actual figures, but when I got to 'pfo' .. 'pctpf' it swallowed all the swap and I decided to reboot rather than wait for it. 'aa' .. 'aaaaa' was fine - producing 475229 elements.

    /J\

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://484155]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-24 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found