Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: When does it pay to use the schwartzian transform?

by runrig (Abbot)
on Dec 16, 2005 at 18:53 UTC ( #517331=note: print w/replies, xml ) Need Help??


in reply to When does it pay to use the schwartzian transform?

It "pays" when the cost of pre-computing the sort keys for all of your elements is significantly less than re-computing the sort keys each time you make a comparison. It depends on the cost of computing a sort key, and the number of elements.
  • Comment on Re: When does it pay to use the schwartzian transform?

Replies are listed 'Best First'.
Re^2: When does it pay to use the schwartzian transform?
by jfroebe (Parson) on Dec 16, 2005 at 18:59 UTC

    When in doubt, test it with the Benchmark module

    Jason L. Froebe

    Team Sybase member

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Re^2: When does it pay to use the schwartzian transform?
by Perl Mouse (Chaplain) on Dec 18, 2005 at 14:14 UTC
    It "pays" when the cost of pre-computing the sort keys for all of your elements is significantly less than re-computing the sort keys each time you make a comparison.
    Well, in most of those cases, it pays to use the Gutman-Rossler Transform.
    Perl --((8:>*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://517331]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-05-25 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (91 votes). Check out past polls.

    Notices?