Thread overview
[Issue 11531] For a faster std.algorithm.group on strings
Apr 11, 2016
Jack Stouffer
Jan 27, 2017
Jack Stouffer
Jan 27, 2017
Stefan Koch
Jan 28, 2017
Jack Stouffer
Dec 17, 2022
Iain Buclaw
April 11, 2016
https://issues.dlang.org/show_bug.cgi?id=11531

Jack Stouffer <jack@jackstouffer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |performance
                 CC|                            |jack@jackstouffer.com

--
January 27, 2017
https://issues.dlang.org/show_bug.cgi?id=11531

--- Comment #1 from Jack Stouffer <jack@jackstouffer.com> ---
Created attachment 1635
  --> https://issues.dlang.org/attachment.cgi?id=1635&action=edit
test.d

Currently group does not auto-decode, and I have attached a test case which shows that using immutable(ubyte)[] rather than string has a huge performance pessimization being almost 2x slower.

--
January 27, 2017
https://issues.dlang.org/show_bug.cgi?id=11531

Stefan Koch <uplink.coder@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uplink.coder@gmail.com

--- Comment #2 from Stefan Koch <uplink.coder@gmail.com> ---
Jack, I do not see anything of the kind.
The performance difference is within 2% and will within fluctuations being
caused by the gc.

--
January 28, 2017
https://issues.dlang.org/show_bug.cgi?id=11531

--- Comment #3 from Jack Stouffer <jack@jackstouffer.com> ---
(In reply to Stefan Koch from comment #2)
> Jack, I do not see anything of the kind.
> The performance difference is within 2% and will within fluctuations being
> caused by the gc.

Hmm dmd does not show this performance problem but ldc does

$ dmd -O -inline -release test.d && ./test
original    5 secs, 355 ms, 103 μs, and 7 hnsecs
new        5 secs, 70 ms, 858 μs, and 6 hnsecs

$ ldc2 -O5 -release test.d && ./test
original    576 ms, 524 μs, and 6 hnsecs
new        992 ms, 676 μs, and 6 hnsecs

Odd.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=11531

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--