Heywood Floyd <soul...@gmail.com> wrote:
I noted that the classinfo.name-strings typically looks like this:
classtype.Foo
classtype.Bar
classtype.Cat
classtype.Dog
Doesn't this first "classtype."-part introduce overhead when these
strings are used as keys in an AA? The string comparer more or less
always have to check the first 10 chars, which are equal for all. (I
know I'm being picky here. But the whole using memory addresses-thing
came from the fear of string comparisons being suboptimal.)
Have you profiled your code and found that comparing classinfo is a
bottleneck? If it is, have you considered a two-layer system? i.e.
foo[transmutedClassInfo], where transmutedClassInfo is the result of
another lookup, that is based purely on the pointer to the classInfo?
(PS. Feature-request: move the "classtype."-part of classinfo names to
the end ; )
I find it unlikely that will ever happen. The classinfo name should be
the same as the FQN of the class.
--
Simen