Bug 13748 – benchmark druntime/benchmark/aabench/string.d fails

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2014-11-18T22:02:00Z
Last change time
2015-02-18T03:38:19Z
Assigned to
schveiguy
Creator
r.sagitario

Comments

Comment #0 by r.sagitario — 2014-11-18T22:02:08Z
The PR https://github.com/D-Programming-Language/druntime/pull/979 causes the benchmark druntime/benchmark/aabench/string.d to fail: - aa.length is one larger than expected - the word "vita" is counted one less than before - when iterating over aa, one entry less than aa.length is traversed
Comment #1 by schveiguy — 2014-11-19T01:14:46Z
Found the issue. The following code tests the problem (adding as a unit test), but is highly dependent on the AA implementation: void main() { int[int] aa; // make all values go into the last bucket (int hash is simply the int) foreach(i; 0..16) { aa[3 + i * 4] = 1; assert(aa.keys.length == i+1); } // now force a rehash, but with a different hash value (lower than current // first used bucket) aa[0] = 1; assert(aa.keys.length == 17); } PR: https://github.com/D-Programming-Language/druntime/pull/1025
Comment #2 by github-bugzilla — 2014-11-19T07:03:14Z
Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/57e3887a2eb9f27008f7925dded49ee056e9d38c Fix issue 13748 -- benchmark druntime/benchmark/aabench/string.d fails https://github.com/D-Programming-Language/druntime/commit/6c6c431853553660c13da6ecffe463db29b8396f Merge pull request #1025 from schveiguy/fix13748 Fix issue 13748 -- benchmark druntime/benchmark/aabench/string.d fails
Comment #3 by safety0ff.bugz — 2014-12-05T05:10:59Z
*** Issue 13626 has been marked as a duplicate of this issue. ***
Comment #4 by github-bugzilla — 2015-02-18T03:38:19Z