[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C based vector and bytevector copy

From: Stefan Israelsson Tampe
Subject: C based vector and bytevector copy
Date: Thu, 3 Feb 2022 08:08:46 +0100

Hi all,

I have streamlined my c-based superfast vector copy lib in
stis-supervectors to get a self contained c-file that generates
*vector-copy! that handles all types of bytevectors and SCM vectors, can
have different directions can have different endianes and can have
arbitrary intervals like pythons [1:2:3]. Only the reasonable safe variants
are possible e.g. not signed to unsigned and not u64 to u32. But we do
doubles -> float (although it can be dangerous). Takes about 10s with O2 to

We may wonder why we need a C based version of this. Well for one thing it
can benchmark guiles' own routines. And all these copy routines can be made
quite fast on contemporary computers (memcpy speed).

If people are interested in including it in guile, I'll be happy to sign
over the copyright to FSF, else it is a nice lib to play with. If there is
interest I can make a small project to host it outside the stis-supervector
lib where a scm interface at a higher level can be made.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]