Bit 0.30.0
Bit 0.30.0
On x86-64, loop values now keep 10 of the 11 allocatable registers across the back-edge safepoint poll instead of 4, because the poll shim saves the caller-saved registers. The register allocator ranks spill candidates by loop-weighted reads. The HTTP request and response path does less work per request, which raises pkg/web plaintext throughput at 64 connections by 10.2%. On Linux, a keep-alive connection no longer issues the read that returns EAGAIN after a drained read, which raises pkg/web JSON throughput at 64 connections by 8.8%.
New builtin loadU64(p: *u8): u64 reads 8 bytes from any address. std/json adds jsonAppend* helpers that write JSON into a []byte without building a Json tree.
Three compiler changes ship switched off and turn on in a later release: signature-checked interface assertions (BIT_IFACE_SIG), bounds-check removal through nested if joins (BIT_BCE_JOIN), and dead block-parameter pruning (BIT_DCE_PARAMS). @json classes can generate a direct __jsonAppend writer under BIT_JSON_APPEND, and the name __jsonAppend is now reserved on every class (E0164).
Compiler
- Repin stage0 to 0.29.0, delete the temporary BIT_STR_REUSE flag (89f2f29)
- regalloc: rank spill victims by loop-weighted reads per register time freed (71729e7)
- regalloc: cite markLoopFreqs by its declared name (ff336dc)
- regalloc: take back the spill weight of an edge argument its param shares a location with (849e1bc)
- x86-64: bit_rt_safepoint saves the caller-saved GPRs, so loop values survive the back-edge poll outside rbx/r13/r14/r15 (7f63332)
- Interface assertion
v.(I)checks method name and signature, behind BIT_IFACE_SIG, default off (3c55ca8) - An unresolved method signature key never matches, never falls back to name only (2519ed4)
- optbce: resolve join params through single-source params, behind BIT_BCE_JOIN, default off (25ce241)
- optbce: bound the resolved lookup at 64 visits, pin the join-grown limit panic (96fc1c0)
- deadCodeElim: prune block parameters nothing reads, behind BIT_DCE_PARAMS, default off (2493f4f)
- Add the loadU64(p: *u8): u64 builtin, an unaligned little-endian 8-byte load (1aab888)
@jsongains __jsonAppend(out: []byte): []byte behind BIT_JSON_APPEND; the name is reserved (E0164) (0200319)
Runtime
- gc: grow the parallel mark pool instead of overflowing it (6ce10e6)
- runtime/net/linux: wait for readiness instead of the EAGAIN read after a short read (009f30d)
Standard library
- std/http putBytes: one range check and one bit_rt_bytes_copy instead of a per-byte loop (bb00ddb)
- std/strings firstByteIn: one function, aligned 8-byte word scan, branchless match locate (6d48db0)
- std/http headerBlockBreaks: test c > '\r' first so an ordinary header byte takes one compare (1a76258)
- std/http serializeResponseInto: one piece per status head, CRLF merged into field names (867928e)
- std/http readMessage: find the framing field lines on headerBlockScan's walk, drop framingLines (31d8976)
- std/json: add jsonAppend* helpers for building JSON without a Json tree (b070494)
- std/json appendEscaped: append the string itself when nothing needs escaping (baf02d9)
- docs/stdlib/json: replace two em dashes (9fa1b64)
pkg/web
- A static route's Match is built once at freeze() (12be506)
- Split the staticRoutes tests into routerstatic.test.bit (c4774c7)
Tests
- Fix gate regressions from the loadU64 addition: citation drift and complexity debt (842e4fc)
- Move the loadU64 fixture out of the stage0 differential corpus (fb23c13)
- census: drop a history note; the census carries numbers only (987366f)
- stringexplode: loop_len reads its slice after the join, so the gate-off box survives DCE (4cda0c6)
- pollfree: list netReadSkipClosed as a reviewed exception (e6631a1)
Benchmarks
Artifacts
Published for aarch64-linux, aarch64-macos, x86_64-linux and x86_64-windows.
See dist/README.md for the full target table, the archive layout,
the required BIT_STDLIB/BIT_LIBBITRT environment, and the
SHA256SUMS format.
Verify a download before running it:
sha256sum --check --ignore-missing SHA256SUMS # shasum -a 256 on macOSFull commit log: v0.29.0..HEAD