[Issue 4489] std.array.insert is slow
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 1 15:56:06 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4489
--- Comment #1 from torhu at yahoo.com 2012-08-01 15:56:03 PDT ---
I just revisited this. I tried with with DMD 2.046 again, just to be sure I'm
doing the same benchmark, and I got:
myInsert(T) 130
insert(T,Range) 240
Basically the same numbers. Then I tried DMD 2.059 and got this:
myInsert(T) 123
insert(T,Range) if (isInputRange!(Range) && is(ElementEncodingType!(Range) :
T))
78716
Wow. About 700 times slower. Not a very realistic use case, though.
So I tried inserting in the middle instead (i/2 instead if i):
myInsert(T) 19694
insert(T,Range) if (isInputRange!(Range) && is(ElementEncodingType!(Range) :
T))
210606
Well, that's only about 20 times slower.
I don't what's going on here, but this is pretty much in line with my general
impression of Phobos 2. There should be a big ALPHA sticker on the whole
thing.
Signed,
Disgruntled D1/Tango user
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list