Skip to content

bitarray 0.7

Choose a tag to compare

@rocketship88 rocketship88 released this 16 Oct 19:52
· 33 commits to main since this release
a20c678

bitarray 0.7: packed integer arrays that behave like Tcl lists (Tcl 9.1 or later)

New since the 0.6 release:

  • Signed 8, 16 and 32 bit elements: -width -8, -16, -32 (a minus sign means signed). -64 is accepted as another name for 64, which was already signed. bitarray width returns the signed form, the bitwise commands need the same width and sign, and tobytes, tochars and fromchars refuse signed arrays.
  • in on a 1-bit array now tests whole 64-bit words and stops at the first word that decides the answer, instead of counting every bit.
  • Four new in rows in the benchmark (extras/listbench.tcl), and a fix for a warm-lsearch row that read 0.0 on Windows.
  • 282 tests (259 in 0.6, plus 21 for the signed widths and 2 for in).
  • Mutation testing: a full run of 206 deliberate bugs, 184 caught; the 22 that were not caught are explained in RESULTS.txt.
  • performance_analysis.md has the new in figures; the simulator (extras/bitarray_stepper.html) has the new in text, shows the isSigned header field, and its Show code button now scrolls to the code.
  • CLAUDE.md, README.md and extras/CLAUDE_NOTES.md now tell an AI assistant to show the simulator and what to check (Code execution and file creation, Allow network egress) if a download or command is refused.

Tested on Linux and on Windows (Visual Studio 2022, Tcl 9.1.1): 282 tests (281 passed and 1 skipped on Windows), the sieve passes, and the benchmark's answer check agrees on 42 operations. A real 32-bit build has not been tested.

Build and test: see README.md (build.sh / build.bat, then run_tests.sh / run_tests.bat). Expected last line of the tests: Total 282 Passed 282 (Windows: Passed 281 Skipped 1).

Simulator (no download needed): https://rocketship88.github.io/tcl-bit-array-extension/extras/bitarray_stepper.html