[Issue 2922] Egregiously bad hashing performance with strings

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 2 11:55:32 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2922





------- Comment #1 from dsimcha at yahoo.com  2009-05-02 13:55 -------
Upon further investigation, the problem is that typeid(string) returns the
typeinfo for a generic array, not for a char[]:

import std.stdio;

void main() {
    writeln(typeid(immutable(char)[]) is typeid(char[]));  // False.
}

Using typeid(char[]) instead of typeid(string) in the above program fixes the
problem.  I guess noone remembered to change this when strings were changed to
default immutable.


-- 



More information about the Digitalmars-d-bugs mailing list