Weird profiling behaviour

Ketil Z. Malde
26 Jun 2002 13:31:42 +0200

Colin Runciman <> writes:

> Could it be that the string-comparison sort simply has less sorting to do
> than the int-comparison sort?

Not quite improbable, hang on while I print the profiling (with
comparison in its own function):  Yes, that seems to be the case, for
90K values to sort, I get 7M string comparisons and 321M integer

I'm running a new test now, with a larger number of values to sort,
we'll see how it goes.

Looks promising, thanks!

> The default definition of sortBy uses insertion sort

I have vague recollection of the wisdom of this choice being
questioned on these lists or others, and even vaguer recollection of
it actually being a good choice.  Comments, anybody?

If I haven't seen further, it is by standing in the footprints of giants