Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^10: Run Perl 5 in the Browser!

by LanX (Saint)
on Aug 24, 2018 at 12:49 UTC ( [id://1221026]=note: print w/replies, xml ) Need Help??


in reply to Re^9: Run Perl 5 in the Browser!
in thread Run Perl 5 in the Browser!

What I suggested is very similar to memoization.

Only you don't cache the result of a function based on passed values.

You cache the optimized code based on passed types *

see https://en.m.wikipedia.org/wiki/Just-in-time_compilation

Hence the "slow" checking only happens at call time.

(of course you'll need kind of type of inference deduce implied types inside a sub)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

*) and global states like bigint

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-18 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found