Agena v. 5.1.2 (12/7/2025, Alexander Walz) |
Readme/What's new |
5.1.2 Incline II, July 12, 2025
- The `lookup` package now allows for subsets instead of subtables as lookup table entries, significantly speeding up search for and deletion of values. Just pass the string 'set' as the optional third argument to `lookup.new`:
> a := lookup.new(0, 0, 'set');
> lookup.include(a, 'abc', 1, 1, 2, 2, 3);
> a.abc:
{1, 2, 3}
All `lookup` functions and metamethods can be called as usual, so the user does not need to care about the internal setup of this data structure.
- With subtables, `lookup.purge` has become 235 percent faster.
- `lookup.subs` has become thrice as fast and consumes only half the memory now.
- Likewise, `lookup.map` has also been rewritten, has become 5 percent faster and also consumes only half the memory now.
- `lookup.getsizes`, `lookup.nextone` and functions returned by `lookup.iterate` have been protected against exhausted stack space.
- New `lookup.checktable` checks all its arguments for lookup tables and issues an error if at least one of its arguments is not a lookup table.
- Similarily, new `lookup.istable` checks all its arguments for lookup tables and returns `true` or `false`.
- With sets, `map` can now work in-place, by passing the `inplace=true' option.
- New `sets.cleanse` removes all values from a set. The function does not resize the set, call `sets.resize` afterwards if needed.
- The C API function `agn_hsize` to get the size of the hash part of a table could not be used in C code. This has been fixed.
- This release has been Valgrind-checked on x86 and x64 Linux to ensure there are neither internal errors nor memory leaks. |
Agena v. 4.12.5 (20/5/2025, Alexander Walz) |
Readme/What's new |
4.12.5 Merryville, May 20, 2025
- In the past, the bitshift operators <<< (left shift), >>> (right shift), <<<< (left rotation) and >>>> (right rotation) had different behaviour across platforms when a number at or beyond the +/-2^32 threshold has been processed. This has been changed and the results in these situations are now the same.
Likewise, `bytes.numto32` is now returning the same results on all platforms when casting a value at or beyond the +/-2^32 border.
This also benefits various functions in the `hashes` package as their returns are now the same across platforms, as well.
To check the new underflow or overflow behaviour, use `math.wrap`.
- New function `math.fmod` works and returns the same result as the binary `symmod` operator. It has just been added to facilitate porting C code to Agena.
- The results of `hashes.mix`, `hashes.crc32`, `hashes.crc8`, `hashes.reflect`, `hashes.parity`, `hashes.fibmod`, `hashes.interweave`, `hashes.jinteger` may now be different with out-of-range input, that is with arguments at or beyond the 2^32 threshold, depending on your platform. |
Commenti
Alexander Walz
Sab, 13/05/2017 - 20:06
Collegamento permanente
Hello,
Aggiungi un commento