Repository navigation
bitarray 0.7
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).-64is accepted as another name for 64, which was already signed.bitarray widthreturns the signed form, the bitwise commands need the same width and sign, andtobytes,tocharsandfromcharsrefuse signed arrays. inon 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
inrows in the benchmark (extras/listbench.tcl), and a fix for a warm-lsearchrow 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.mdhas the newinfigures; the simulator (extras/bitarray_stepper.html) has the newintext, shows theisSignedheader field, and its Show code button now scrolls to the code.CLAUDE.md,README.mdandextras/CLAUDE_NOTES.mdnow 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