in reply to Re: Unique numeric ID for reference?
in thread Unique numeric ID for reference?
The competition is an indexed dereference, and my guess is a regex has to be slower than that.
In any case, Juerd's pointing out that all I needed to do was force the reference to numeric (duh! I feel so dumb) seems to settle the matter.
As for just using the string, the GRS transform means putting it into a sortable pack() string. There's more than one reference in the sort key, and a couple of ordinary numerics and a Boolean as well. Since the strings are variable length they require a little bit of trickery to pack and they are longer than integers. I also wonder if stringify'ing doesn't have a higher cost than forcing to numeric.
For yucks, I probably should Benchmark the choices, but if anything beats Juerd's suggestion, I'll be a little stunned.
jeffrey
|
|---|