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

Re: GDB journey into perl internals

by ForgotPasswordAgain (Deacon)
on Mar 17, 2008 at 14:23 UTC ( #674567=note: print w/ replies, xml ) Need Help??


in reply to GDB journey into perl internals

Probably in some SV which is sv_2mortal()-ized more than necessary.

For what it's worth, I think that is very likely the cause though I don't know why. (See the note in http://search.cpan.org/src/SLANNING/Ogre-0.35/Ogre.xs (search for mortalized).)

So what did you do to speed things up so much?


Comment on Re: GDB journey into perl internals
Re^2: GDB journey into perl internals
by cosimo (Hermit) on Mar 18, 2008 at 20:26 UTC

    About the speed up: this is a custom module in which I reimplemented already existing Perl code in C/XS. The main task of this code is to "serialize" to string whatever you throw at it, with custom rules.

    For instance, strings are kept as strings, arrays are just joined, hashes are output as HASH(0x...) unless they have special keys, and objects are serialized with their toString() method, if they have one...

    All these conversions are pushing CPUs. I made a quick prototype where I saw 100% speedups. So I decided to go for it and here it is...

    For the curious, this is part of a proprietary large scale web framework that automatically generates themed HTML/CSS code from high-level "GUI" widgets/controls implemented as Perl classes.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-07-23 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (133 votes), past polls