Repository navigation
iyi 0.22.0: a string's hash keyed per process, request limits a server sets, and a parallel runtime that holds under load.
At a glance
| 0.21.0 | 0.22.0 | |
|---|---|---|
65,536 keys built to collide, put in a Hash (Linux x86-64, --release) |
3,196 ms (8 ms for ordinary keys) | about what ordinary keys cost |
The same keys read by JSON.parse as one object |
6,395 ms | about what ordinary keys cost |
| #145's app, steady / peak / 5 s after the load (Linux, 12 vCPU) | 170 / 217 / 212 MB | 127 / 163 / 124 MB |
| #145's app, the same (Windows 11, 12 logical processors) | 166 / 228 / 225 MB | 123 / 158 / 137 MB |
| #145's app, the same (macOS 26.6, Apple M2 Pro) | 179 / 239 / 235 MB | 134 / 163 / 150 MB |
| Concurrent panics, lines torn (8 threads, Linux / Windows 11 / macOS) | 58-62 % / 85-95 % / 94-96 % | 0 of 5.1 M / 4.2 M / 20.5 M lines |
24 small tests on 12 logical cores (iyi test) |
22.6-24.0 s one at a time | 7.4-7.6 s, six at once by default |
| std/acme's 379 language-server questions | 486 s on 230 workers | 56 s on 18 workers |
Go's goturkiye still holds less memory on the same #145 load (47-54 MB steady); 0.22.0 closes 35-37 % of that gap.
Security
String#hashis SipHash-1-3, keyed afresh in every process from the system's entropy (getrandom,arc4random_buf,RtlGenRandom, wasm'srandom_get). FNV-1a from a fixed start let anyone build keys offline that all shared one hash, so a request body's JSON or std/http's headers could make a table quadratic (#212). Keys of 64 bytes or more hash 2-5 times faster than before; an 8-byte key costs about 4 ns more.- std/http holds a request to
max_headandmax_body, whichServer.serveandServer.handlenow take (#213), and refuses a head past its limit whose end arrived in the same read, which it used to serve. - std/tls, std/x509, std/ocsp, std/cookie, std/password, std/otp, std/rsa, std/big and std/system_roots close what a peer could reach: bounded chain searches, early data and tickets held to what the server would take, a bcrypt that refuses what it would cut, constant-time masks kept in the machine code, and more (see the CHANGELOG).
iyi.sumhashes are SHA-256 and say where each file ends, and every manifest MVS reads is pinned.install.shdoes not unpack a tarball it could not check.
The runtime 0.21.0 made parallel
- A pool short of workers fills: ten spinning tasks no longer stay on nine workers.
- A finished thread's main fiber no longer stays on the scheduler's registry (59 of 8,000 thread waves at 0.21.0 on the M2, none now).
- Threads that panic at once print whole lines: each report is one write.
- Each size class keeps warm only what it took the epoch before, and an idle pool hands its warm pages back: the memory table above.
- Every collector and scheduler gate now catches its deliberately broken copy on every run, under load, on Linux, macOS and Windows.
Experimental: heap22
-Dheap_partitions gives each pool unit a heap partition of its own that the unit collects on its own thread while the rest of the program runs; what crosses between units is published to the shared heap first. It is a prototype, kept or dropped on its measurements. Without the flag a build is the same as before.
Compiler and tools
- A build that runs a command from a macro is no longer taken for up to date by the next one; the up-to-date check could lose what a build read.
- A regex literal a macro writes compiles in an iyi program (#215), and a
libglobal read by a generic that travels through a.iyimodis declared on the far side (#204). - The compiler's cache stays bounded: reach verdicts, link templates and killed runs' programs are removed.
iyi lspno longer recompiles a large module for every question.iyi testruns tests at once (-p N), reports each named case, and takes--run,--releaseand-D.File.open?,File.read?,File.write?and aFileIO'swrite?,flush?andclose?answer a refusal as anIOError(#214).iyi doc --jsonprints a package's exported API as data.
What you need to change
- A macro in a
.iyifile that calledsystemor backticks is refused at its line;read_filereads only within its package and std, and only the root package readsenv. - The signing calls of std/rsa, std/tls, std/x509 and std/acme answer an error beside the signature;
Bcrypt.hashpanics for a password with a NUL or past 72 bytes; std/otp refuses a secret under 16 bytes unlessmin_secret:says less;Cookie#to_set_cookiepanics for a path, domain orSameSitea cookie cannot carry. iyi.sumlines areh2:, which 0.21.0 does not read: a team that shares one upgrades together. Runiyi mod tidyand commit what it writes.- A string's hash differs from one run to the next.
Full list: CHANGELOG.md