Best interface for memcpy() (and the string.h family of functions)

Jonathan Marler johnnymarler at gmail.com
Wed May 29 23:27:35 UTC 2019


On Wednesday, 29 May 2019 at 20:28:18 UTC, Stefanos Baziotis 
wrote:
> On Wednesday, 29 May 2019 at 19:35:36 UTC, Jonathan Marler 
> wrote:
>>[...]
> Great, you can see that in the benchmarks, memcpyD is faster 
> than libc memcpy
> except for sizes larger than 32768. We hope that we can surpass 
> those
> as well, as yesterday I did some simple inline SIMD things and 
> got better performance in 32768.
> But previous work is of course responsibility of Mike and those 
> benchmarks
> are in part because of inlining.
>
>>[...]
>
> This is, as I said, the alignment guarrantee. I hope that I can 
> get other benefits
> from types also.
> Also, hopefully we will do LDC / GDC specific things. Leverage 
> the intrinsics for example.
> I will put an update shortly, as the other students, explaining 
> some of that, but I thought since we started it.. :p
>
>> [...]
>
> Great! We hope that it will be useful and any feedback is 
> appreciated!

I haven't benchmarked it yet but here's the changes I've made to 
my standard library to also take advantage of alignment 
guarantees from typed pointers and arrays.

https://github.com/dragon-lang/mar/commit/bb096d2d4f489d47177f6a678b1d9bab756e3dc7



More information about the Digitalmars-d mailing list