www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - New developments on topic of memset, memcpy and similar

reply Igor <stojkovic.igor gmail.com> writes:
Two years ago there was a [Google Summer of Code 
project](https://forum.dlang.org/thread/izaufklyvmktnwsrmhci forum.dlang.org)
to implement these primitives in pure D for various reason. It was concluded
the project isn't viable and was abandoned, but there were some interesting
learnings. I now stumbled on some new work in C land about these that might be
interesting to people that were following the original project so I am sharing
it here:

Custom ASM implementation that outperforms libc: 
https://github.com/nadavrot/memset_benchmark
Paper on automatic implementation of these primitives: 
https://dl.acm.org/doi/pdf/10.1145/3459898.3463904
Nov 27 2021
next sibling parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Saturday, 27 November 2021 at 11:15:45 UTC, Igor wrote:
 Two years ago there was a [Google Summer of Code 
 project](https://forum.dlang.org/thread/izaufklyvmktnwsrmhci forum.dlang.org)
to implement these primitives in pure D for various reason. It was concluded
the project isn't viable and was abandoned, but there were some interesting
learnings. I now stumbled on some new work in C land about these that might be
interesting to people that were following the original project so I am sharing
it here:

 Custom ASM implementation that outperforms libc: 
 https://github.com/nadavrot/memset_benchmark
 Paper on automatic implementation of these primitives: 
 https://dl.acm.org/doi/pdf/10.1145/3459898.3463904
Haven't read yet, but how did they make it portable?
Nov 27 2021
parent Igor <stojkovic.igor gmail.com> writes:
On Saturday, 27 November 2021 at 11:48:02 UTC, Imperatorn wrote:
 On Saturday, 27 November 2021 at 11:15:45 UTC, Igor wrote:
 Two years ago there was a [Google Summer of Code 
 project](https://forum.dlang.org/thread/izaufklyvmktnwsrmhci forum.dlang.org)
to implement these primitives in pure D for various reason. It was concluded
the project isn't viable and was abandoned, but there were some interesting
learnings. I now stumbled on some new work in C land about these that might be
interesting to people that were following the original project so I am sharing
it here:

 Custom ASM implementation that outperforms libc: 
 https://github.com/nadavrot/memset_benchmark
 Paper on automatic implementation of these primitives: 
 https://dl.acm.org/doi/pdf/10.1145/3459898.3463904
Haven't read yet, but how did they make it portable?
Regarding custom ASM implementation I think it is only for X64 platform.
Nov 27 2021
prev sibling next sibling parent user1234 <user1234 12.de> writes:
On Saturday, 27 November 2021 at 11:15:45 UTC, Igor wrote:
 Two years ago there was a [Google Summer of Code 
 project](https://forum.dlang.org/thread/izaufklyvmktnwsrmhci forum.dlang.org)
to implement these primitives in pure D for various reason. It was concluded
the project isn't viable and was abandoned, but there were some interesting
learnings. I now stumbled on some new work in C land about these that might be
interesting to people that were following the original project so I am sharing
it here:

 Custom ASM implementation that outperforms libc: 
 https://github.com/nadavrot/memset_benchmark
 Paper on automatic implementation of these primitives: 
 https://dl.acm.org/doi/pdf/10.1145/3459898.3463904
Also LLVM has intrinsics or special instructions for those libc stuff. I suppose that there are special optimz that are tried and if not possible that falls back to the libc version.
Nov 27 2021
prev sibling parent MrSmith <mrsmith33 yandex.ru> writes:
On Saturday, 27 November 2021 at 11:15:45 UTC, Igor wrote:

Additionally, here is the twitter thread from the author: 
https://twitter.com/nadavrot/status/1464364562409422852
Nov 27 2021