Re: [MLton] [MLton-user] List and String concatenation speed.

Kostirya <[email protected]> Sun, 27 Aug 2017 09:55:31 +0300
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <CAG+QnTcz20XrxC7E54f-4M8MN8NQ1q4nmHqEUBikLrxm5nW0Ew__36211.2216921107$1503943576$gmane$org@mail.gmail.com>
Thanks!

2017-08-20 14:42 GMT+03:00 Matthew Fluet <[email protected]>:
> On Tue, Aug 30, 2016 at 3:44 PM, Matthew Fluet <[email protected]> wrote:
>> On Tue, Aug 30, 2016 at 10:39 AM, Kostirya <[email protected]> wrote:
>>> Many thanks!
>>> I use
>>>
>>> let
>>>     val arr = Primitive.Array.arrayUnsafe (a_length + b_length)
>>> in
>>>     string_concat_memmove(arr, a, a_length, b, b_length);
>>>     Primitive.String8.idFromWord8Vector (Primitive.Vector.fromArrayUnsafe
>>> arr)
>>> end
>>>
>>> and got 20 times performance boost!
>>
>> Nice!  And is this implementation now faster than the Basis Library's
>> implementation of String.^?  If so, then that is good evidence that we
>> should invest in some kind of memmove-like primitive for copying data
>> between sequences.  Doing it as a primitive with compiler/Basis
>> Library support would allow us to use it for all kinds of sequences,
>> so that it could speed up things like Vector.concat and Array.copy.
>
> [Following up on an old thread; archive at:
> https://sourceforge.net/p/mlton/mailman/mlton-user/thread/CAG%2BQnTcffmvXcpFv9rivvwdcsRXvUCorYVdEPmhjCE8EHEpOig%40mail.gmail.com/#msg35312358]
>
> A memmove-like primitive for copying data between sequences has been
> implemented, with promising results for large sequences (e.g.,
> String.^), but incurs some small overhead for very small sequences.
> See https://github.com/MLton/mlton/pull/192 for more details.
>
> --
> You received this message because you are subscribed to the Google Groups "MLton-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> MLton-user mailing list
> [email protected]; [email protected]
> https://lists.sourceforge.net/lists/listinfo/mlton-user

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot