Jerry D. Hedden wrote:
> It's not the use of overload.pm that is still the issue.
> It's just that generating the Class=TYPE(0xADDR) string
> takes so much time.  Your patch puts stringification of
> overloaded and non-overloaded objects nearly on a par.
> However, both still pale in comparison to getting a TID:

Nicholas Clark wrote:
> Well, if stringification of references really needs to be as fast as
> possible
>
> [code delete]
>
> which gets me
> 
>      Rate  tid  thr  obj
> tid 472/s   -- -13% -17%
> thr 539/s  14%   --  -5%
> obj 565/s  20%   5%   --
> 
> but I'm not sure if it's really worth making this change to
> sv_2pv_flags.

For less than a couple dozen lines of code, this is a great
improvement.  I would recommend it.  I get the feeling that
people do this sort of thing more often than you might think.

> [Hmm, thinking about it further as I'm doing all the
> length calculations explicitly I don't actually need a
> mortal SV for a scratch buffer. I could just malloc() it
> directly, and use SAVEFREEPV() to free it later]

And make it even faster?  Sounds good.  Please do it.

> The moral seems to be that sprintf() derived formatters
> are slow.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to