Commit Graph

5 Commits

Author SHA1 Message Date
tersec 326ef09a46
remove dead code under Nim 1.6+ (#206) 2023-07-31 21:07:48 +00:00
Miran d37e77a72b
make it more Nim 1.4+ compatible (#131)
* make it more 1.6-compatible

* these changes are from 1.4 forward
2022-07-26 17:52:59 +00:00
Jacek Sieka 4e223b95a7
endians2: use copyMem instead of loop outside of vm (#95)
Looking at generated assembly, it turns out the optimizer is not smart
enough to get rid of the loop - use `copyMem` instead.

At least the compiler is smart enough to constant-propagate runtime
endian direction, resolving the review comment.

Also clarify why a minimum length is enfored - it could perhaps be
revisited, but that would leave a slightly odd API.

the `array` overloads are actually unnecessary with an optimizing
compiler - as long as it can prove the length, any extra checks will go
away on their own

also add `initCopyFrom`

* document optimizations
2022-01-03 14:53:01 +01:00
Jacek Sieka 8a405309c6
enable styleCheck:usages (#93) 2021-12-02 16:24:02 +01:00
Jacek Sieka d8d914332d
random helpers (#64)
* random helpers

* arrayops as a home for small array/openArray utilities
* assign2 - a replacement for genericAssign and assignment operators in
general which in nim are very slow
* use assign2 in a few places to speed things up

* fixes

* fixes
2020-12-10 12:05:22 +01:00