in reply to Re: Accessors in xs
in thread Accessors in xs

Yes, I've been thinking about that. I have a few more I want to convert first. I don't like going down to function calls if the rest of the program is OO, but I might not have a choice.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^3: Accessors in xs
by diotalevi (Canon) on Oct 25, 2005 at 15:55 UTC

    If you think your overhead is in method calls, check to see that you're not doing anything which invalidates the method cache:

    • Assigning type globs
    • Assigning functions into the symbol table
    • Creating or removing named functions
    • Modifying @ISA

    Since you're using XS already, you may want to write a short function to instrument PL_sub_generation to see if its changing. Anytime it increments, your cache is invalidated.


    New as of 5.9.4, this function is B::sub_generation