Denis Shelomovskii

Results 21 comments of Denis Shelomovskii

> Looks good, maybe add a few microbenchmarks to OK, I will able to do it probably tomorrow. > Why all the style changes? Do you mean `const` additions, spaces...

> ...doing these checks is tricky because of the ways some compilers generate code. The way I wrote the code was to avoid various code generators invalidating the results. Do...

`return cast(size_t) (n >>> T.sizeof * 8 - 1);` > Many compilers generate very good code for `bool b = a < b;`. I suggest that instead of the shift....

- Improved the original version by using `(a ^ b)._signBit` instead of `a._signBit ^ b._signBit` to save one shift operation. - Restored reference to silly blog post (still against this...

> Performance-wise, I find it a bit slower with DMD than the old version was. With DMD, could you check the first commit (the one without the use of logical...

> The bitwise version was slightly slower than the logical version, even after I optimized it by combining some unnecessary shift operations. What functions exactly are you measuring? Is `adds`...

> If this pull request is accepted, it should be for some reason other than runtime performance. Agree. I tried to improve the whole module implementation style.

> This is `a && b / c != d`, parenthesis really does help make it clear at a glance just exactly what it is doing. Readded. > I would...

> Looks good, maybe add a few microbenchmarks to https://github.com/D-Programming-Language/druntime/tree/master/benchmark. Not sure about benchmarks. For now I only can describe resulting machine code. This is what _Clang_ does (one can...

`~diffSign(x, y) && diffSign(x, r)` is a wrong code if `diffSign` returns `1`. ~~Further looking at resulting assembly is even more interesting:~~ ~~`~diffSign(x, y) && diffSign(x, r)` gives us this...