in reply to Sort::Key::Multi example
In response to your surprise, see also:
- When does it pay to use the schwartzian transform?
- Benchmark, -s versus schwartzian (in particular: Re: Benchmark, -s versus schwartzian)
In general, as reïterated in most "Why is the Schwartzian Transform slower?!" nodes, often by the man himself, the ST only saves time when the keys to be compared for sorting are expensive to compute. In this case, comparing two pairs of numerical array items is a very fast operation (compared to, say, fetching an item from a database or disk).
|
---|
In Section
Meditations