Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)

by philcrow (Priest)
on Dec 12, 2006 at 14:03 UTC ( #589277=note: print w/replies, xml ) Need Help??


in reply to Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)

StringBuilder was "faster"
Are people still suggesting that machine cycles represent the optimal metric of efficiency? Since I started programming in the 1980's people have been making that up hill argument. Isn't an extra $25 toward a better processor a great trade off against me having to maintain the first code sample above.

In short, to me faster must be measured in my time, not the computer's time. The vacuum tube days of catering to the time demands of the machines should, by now, be long gone.

Phil

  • Comment on Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)

Replies are listed 'Best First'.
Re^2: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
by bibliophile (Parson) on Dec 12, 2006 at 15:30 UTC
    It also suffers from the sin of premature optimization...

    Do it the easy (and more maintainable) way first, and then find out if it is "too slow". You can always optimize later.

    (or, as you say, buy a faster processor :-)

    -- WARNING: You are logged into reality as root.
      this was totally useless, thanks for giving up my hopes!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589277]
help
Chatterbox?
[marinersk]: Corion This DBA wants to smack others who like putting whitespace in column names.
[marinersk]: s/smack/whap/;
[talexb]: Wow, what hilariously bad form.
[SuicideJunkie]: Just wait; someday soon, you'll be given a DB with unicode emojis in the column names.
[Corion]: marinersk: Well, I have done select statements like select sum(foo) as "Total Amount", ..., but to have a table like that makes me shudder
[Corion]: SuicideJunkie: :-D
[marinersk]: SuicideJunkie LOL
[choroba]: Woohoo! Fixed a test that hasn't run for 3 years.
[marinersk]: Corion Yes, sometimes whitespace in column headers is acceptable, but I still consider it be less than desireable if that query might get revectored for an ETL-esque process...
[marinersk]: choroba++

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-05-25 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?