Banning eval's visibility of lexicals is the number 1 way to optimize perl to C speed. You have to compile out the "english". Also banning magic would allow common subexpression elimination and convert SVs into more C like data/machine words. Reducing usage of the perl stack might be a worth idea to pursue. Considered taking a profiler to all the perl opcodes and see which are the slowest? I've modified NYTProf for myself to time per opcode times (part of NYTProf's CORE:: profiling system). There is a list in some header of NYTProf which says which opcodes to profile.
A random idea I thought of today is, stop pp_sassign for target aware opcodes. sv_setsv does bail out almost instantly if source and dest SV*s are the same, but pp_sassign goes through alot of code until it calls sv_setsv.
Sadly, your best bet is to write a Perl 5 to .NET CIL or Java bytecode compiler since pretty much all CPUs nowadays are tuned to running one of those 2 VMs.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|