Thread overview
[Issue 19412] std.algorithm.cmp with default ordering can use memcmp for all big-endian or size 1 unsigned types (instead of just char)
Nov 19, 2018
Nathan S.
Nov 19, 2018
Nathan S.
Mar 09, 2019
Dlang Bot
Mar 09, 2019
Nathan S.
[Issue 19412] std.algorithm.cmp with default ordering can use memcmp for all size 1 unsigned types (instead of just char)
Mar 09, 2019
Nathan S.
Apr 12, 2019
Dlang Bot
November 19, 2018
https://issues.dlang.org/show_bug.cgi?id=19412

Nathan S. <n8sh.secondary@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|std.algorithm.cmp with      |std.algorithm.cmp with
                   |default ordering can use    |default ordering can use
                   |memcmp for all unsigned     |memcmp for all big-endian
                   |types that are big-endian   |or size 1 unsigned types
                   |or have size 1 (instead of  |(instead of just char)
                   |just char)                  |

--
November 19, 2018
https://issues.dlang.org/show_bug.cgi?id=19412

--- Comment #1 from Nathan S. <n8sh.secondary@hotmail.com> ---
Pull request: https://github.com/dlang/phobos/pull/6776

--
March 09, 2019
https://issues.dlang.org/show_bug.cgi?id=19412

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #2 from Dlang Bot <dlang-bot@dlang.rocks> ---
@n8sh updated dlang/phobos pull request #6776 "std.algorithm.cmp with default ordering can use memcmp for all big-endian or size 1 unsigned types (instead of just char)" fixing this issue:

- Fix Issue 19412 - std.algorithm.cmp with default ordering can use memcmp for all big-endian or size 1 unsigned types

  ... instead of just char.

https://github.com/dlang/phobos/pull/6776

--
March 09, 2019
https://issues.dlang.org/show_bug.cgi?id=19412

--- Comment #3 from Nathan S. <n8sh.secondary@hotmail.com> ---
Benchmarking shows that whether memcmp is an improvement or not for wider-than-byte types depends on input length, so this is conservatively being changed to just unsigned byte-width types.

--
March 09, 2019
https://issues.dlang.org/show_bug.cgi?id=19412

Nathan S. <n8sh.secondary@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|std.algorithm.cmp with      |std.algorithm.cmp with
                   |default ordering can use    |default ordering can use
                   |memcmp for all big-endian   |memcmp for all size 1
                   |or size 1 unsigned types    |unsigned types (instead of
                   |(instead of just char)      |just char)

--
April 12, 2019
https://issues.dlang.org/show_bug.cgi?id=19412

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/phobos pull request #6776 "std.algorithm.cmp with default ordering can use memcmp for all size 1 unsigned types (instead of just char)" was merged into master:

- 7bfb20737647948d16dcf3a7e16796da89f229cb by Nathan Sashihara:
  Fix Issue 19412 - std.algorithm.cmp with default ordering can use memcmp for
all size 1 unsigned types

  ... instead of just char.

https://github.com/dlang/phobos/pull/6776

--