At 12:25 AM 3/22/2002 -0500, Melvin Smith wrote: >At 08:53 PM 3/21/2002 -0800, Brent Dax wrote: >>Just do "$1=Parrot_sprintf_c(interpreter, "%Vd", $2);". I've already >>implemented this logic there; there's no sense having it in the core >>twice. > >Calling the sprintf routine is kind of expensive if the op is only to >convert an >int to a base10 string rep. We are talking dozen lines of C code for the op.
Hmm I did not see int_to_str() or I might have reused that... Anyway, I had that base10 ltoa() already written from a library from years back. Its a minor nit, mine does the conversion without reversing the string, yours is general purpose, I see no reason not to keep both. Knowing Dan, he will probably want to inline those 12 lines anyway so no sub jump. :) -Melvin