in reply to Help with number conversion

Why is "efficient" important here?

Efficient in what way?

xoxo,
Andy
--
<megaphone> Throw down the gun and tiara and come out of the float! </megaphone>

Replies are listed 'Best First'.
Re: Re: Help with number conversion
by belg4mit (Prior) on Apr 03, 2002 at 06:09 UTC
    Well "efficient" is subjective here I think. Does he mean "wins when you Benchmark"? Or does he mean "least number of bytes of source to accomplish a task"? Or perhaps even "the most elegant and understandable solution"? All of which are laudable goals, at different times and for different reasons, which may of course have conflicting solutions. Though yes, in general the first definition is what is intended. Just some rambling thoughts...

    UPDATE: Just wanted to expand on this, when I first started I focused primarily on the second form. For three reasons a) I had a small disk quota b) I did not know how to optimize for the first (and still am not great at it) c) I thought this was optimizing for the first. I figured "the smaller the source the less in memory, the less to handle etc. etc." Which is all of course mostly irrelevant. Insert bit about premature optimization here. Thought this might be some interesting background into how some approach things.

    --
    perl -pe "s/\b;([st])/'\1/mg"