8 Commits

Author SHA1 Message Date
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
47ff49aae7
fix use of compiler intrinsics in endians/bitops (#54)
* fix use of compiler intrinsics in endians/bitops

* windows fix
2020-09-21 08:43:27 +02:00
rockcavera
2218717cf6
fixes for -d:swapBytesBuiltin --cc:vcc
renamed the `builtin_bswapT` procedures of the vcc compiler to `swapBytesBuiltin`, to then work correctly with `-d:swapBytesBuiltin --cc:vcc`
2020-05-19 21:58:46 -03:00
Jacek Sieka
5512e89d4c a few more cleanups
* add raises to endians2, bitops2 since they sometimes call C functions
2020-04-10 22:40:00 +03:00
kdeme
0c3ab3eb78 Fix endianness typos 2019-10-03 16:38:42 +03:00
Zahary Karadjov
19fd0cc489
Hide the complexity of dealing with the BitSeq marker bit inside an efficient machine words iterator 2019-08-06 21:02:03 +03:00
Jacek Sieka
d6e431dee2
stricter endian type matching 2019-07-12 12:20:26 +02:00
Jacek Sieka
7a87693eaf
refactor bitops2, add endians2 2019-07-06 20:47:08 +02:00