Fix assertion failure in datetime.stopwatch when compiling with -O2#639
Fix assertion failure in datetime.stopwatch when compiling with -O2#639ibuclaw merged 1 commit intoD-Programming-GDC:masterfrom
Conversation
|
@ibuclaw can you help forge upstream an intrinsic (or a set of) for use in |
|
In this case its not so much a problem that the first benchmark takes no time, the unittest here is only making sure that the second function took longer. |
|
For this specific case it probably doesn't matter, but I think |
jpf91
left a comment
There was a problem hiding this comment.
OK, but why version(GNU)? LDC could be affected as well, or maybe will be in the future.
|
@jpf91 - Oh, Edit, actually, I was beaten. Upstream PR is here: dlang/phobos#6265 |
|
@ZombineDev - As for the assembler, it should work to have: All asm statements are marked |
|
Granted though, I don't think there's anything peculiar about these primitives that they can't just be intrinsics also. |
See also: dlang/phobos#5416 |
The benchmark could take no time at all because the benchmark is inlined, and the loop is removed.