zig/lib/std
Travis Staloch 8af59d1f98 ComptimeStringMap: return a regular struct and optimize
this patch renames ComptimeStringMap to StaticStringMap, makes it
accept only a single type parameter, and return a known struct type
instead of an anonymous struct.  initial motivation for these changes
was to reduce the 'very long type names' issue described here
https://github.com/ziglang/zig/pull/19682.

this breaks the previous API.  users will now need to write:
`const map = std.StaticStringMap(T).initComptime(kvs_list);`

* move `kvs_list` param from type param to an `initComptime()` param
* new public methods
  * `keys()`, `values()` helpers
  * `init(allocator)`, `deinit(allocator)` for runtime data
  * `getLongestPrefix(str)`, `getLongestPrefixIndex(str)` - i'm not sure
     these belong but have left in for now incase they are deemed useful
* performance notes:
  * i posted some benchmarking results here:
    https://github.com/travisstaloch/comptime-string-map-revised/issues/1
  * i noticed a speedup reducing the size of the struct from 48 to 32
    bytes and thus use u32s instead of usize for all length fields
  * i noticed speedup storing KVs as a struct of arrays
  * latest benchmark shows these wall_time improvements for
    debug/safe/small/fast builds: -6.6% / -10.2% / -19.1% / -8.9%. full
    output in link above.
2024-04-22 15:31:41 -07:00
..
Build std.Build: revert --host-target, --host-cpu, --host-dynamic-linker 2024-04-18 03:02:13 -07:00
c std.fs.Dir.openFile: use wasi libc API when -lc 2024-04-18 17:49:05 -07:00
compress compress.xz: remove unnecessary variable 2024-03-13 18:43:36 +01:00
crypto ComptimeStringMap: return a regular struct and optimize 2024-04-22 15:31:41 -07:00
dwarf extract std.posix from std.os 2024-03-19 11:45:09 -07:00
fmt implement ryu 64-bit backend 2024-03-29 22:15:17 -07:00
fs ComptimeStringMap: return a regular struct and optimize 2024-04-22 15:31:41 -07:00
hash std.hash.crc: get rid of usingnamespace 2024-04-11 14:42:04 -07:00
heap WasmAllocator: fix safety panic during OOM 2024-03-23 11:32:37 +01:00
http ComptimeStringMap: return a regular struct and optimize 2024-04-22 15:31:41 -07:00
io std.io: remove BufferedTee 2024-03-20 21:05:35 -07:00
json json.WriteStream.objectFieldRaw() (#19553) 2024-04-06 03:52:20 -04:00
math std: fix big int llshr to respect aliasing (#19612) 2024-04-13 03:06:23 -07:00
mem
meta std: promote tests to doctests 2024-03-21 14:11:46 -07:00
net std.net, std.http: simplify 2024-02-23 02:37:11 -07:00
os Fix usage of unexpectedErrno 2024-04-20 19:37:41 -07:00
posix cbe: fix optional codegen 2024-04-13 01:35:20 -04:00
Random extract std.posix from std.os 2024-03-19 11:45:09 -07:00
sort
tar std.tar: implement executable bit only 2024-04-02 14:02:43 -07:00
Target std.Build: revert --host-target, --host-cpu, --host-dynamic-linker 2024-04-18 03:02:13 -07:00
testing
Thread std: fix Thread.Pool.spawn 2024-04-19 13:49:06 -07:00
time std: promote tests to doctests 2024-03-21 14:11:46 -07:00
tz
unicode
valgrind valgrind client request wrappers take const pointers (#19237) 2024-03-26 14:00:13 +02:00
zig ComptimeStringMap: return a regular struct and optimize 2024-04-22 15:31:41 -07:00
array_hash_map.zig std.array_hash_map: remove meta context verification 2024-03-21 19:40:56 -07:00
array_list.zig Refactor ArrayList replaceRange tests 2024-04-02 13:46:51 -07:00
ascii.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
atomic.zig bsd: debitrot AtomicOrder renames 2024-03-15 02:28:50 -04:00
base64.zig improve documentation in std 2024-03-10 18:13:30 -07:00
bit_set.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
BitStack.zig
bounded_array.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
buf_map.zig
buf_set.zig Change many test blocks to doctests/decltests 2024-02-26 15:18:31 -08:00
Build.zig Merge pull request #19689 from nektro/nektro-patch-29794 2024-04-18 16:38:11 -07:00
builtin.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
c.zig haiku: debitrot 2024-03-23 18:11:32 +01:00
child_process.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
coff.zig lib/std/coff: add ImportNameType.NAME_EXPORTAS variant 2024-03-29 20:34:28 +01:00
compress.zig improve documentation in std 2024-03-10 18:13:30 -07:00
crypto.zig Merge pull request #19239 from jedisct1/ml-kem 2024-03-11 18:48:08 -07:00
debug.zig std.debug.panic: pass the args 2024-04-11 23:33:38 -07:00
dwarf.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
dynamic_library.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
elf.zig improve documentation in std 2024-03-10 18:13:30 -07:00
enums.zig compiler: implement analysis-local comptime-mutable memory 2024-03-25 14:49:41 +00:00
fifo.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
fmt.zig compiler: implement analysis-local comptime-mutable memory 2024-03-25 14:49:41 +00:00
fs.zig fix compilation failures found by CI 2024-03-19 16:18:18 -07:00
gpu.zig
hash.zig
hash_map.zig std.hash_map: fix pointer lock safety false positive 2024-03-20 17:14:52 -07:00
heap.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
http.zig std.http.Server: expose arbitrary HTTP headers 2024-02-23 02:58:02 -07:00
Ini.zig
io.zig Uri: propagate per-component encoding 2024-04-10 02:11:54 -07:00
json.zig
leb128.zig
linked_list.zig
log.zig
macho.zig The Mach-O header flags gained two new members at some point, and these are missing in the Zig std library. This PR adds these. 2024-04-18 20:08:03 -07:00
math.zig WindowsSdk: fix for new x86_64-windows CI 2024-04-14 21:26:08 -04:00
mem.zig std.mem.indexOfSentinel: valgrind integration 2024-03-21 15:01:57 -07:00
meta.zig ComptimeStringMap: return a regular struct and optimize 2024-04-22 15:31:41 -07:00
multi_array_list.zig std.builtin: make container layout fields lowercase 2024-03-11 07:09:07 -07:00
net.zig compiler: un-implement #19634 2024-04-17 13:41:25 +01:00
once.zig std: improve std.once tests 2024-04-15 15:24:30 -07:00
os.zig fix compilation failures found by CI 2024-03-19 16:18:18 -07:00
packed_int_array.zig compiler: un-implement #19634 2024-04-17 13:41:25 +01:00
pdb.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
posix.zig Fix usage of unexpectedErrno 2024-04-20 19:37:41 -07:00
priority_dequeue.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
priority_queue.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
process.zig ArgIteratorWindows: Match post-2008 C runtime rather than CommandLineToArgvW 2024-04-15 02:09:48 -07:00
Progress.zig std.builtin: make atomic order fields lowercase 2024-03-11 07:09:10 -07:00
Random.zig
RingBuffer.zig std.RingBuffer: use sliceAt/sliceFirst in read*AssumeLength 2024-03-10 18:17:23 +11:00
segmented_list.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
SemanticVersion.zig Change many test blocks to doctests/decltests 2024-02-26 15:18:31 -08:00
simd.zig improve documentation in std 2024-03-10 18:13:30 -07:00
sort.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
start.zig cbe: rewrite CType 2024-03-30 20:50:48 -04:00
start_windows_tls.zig
static_string_map.zig ComptimeStringMap: return a regular struct and optimize 2024-04-22 15:31:41 -07:00
std.zig ComptimeStringMap: return a regular struct and optimize 2024-04-22 15:31:41 -07:00
tar.zig fetch: use empty string instead of null for root_dir 2024-04-09 15:00:22 +02:00
Target.zig wasi: change default os version to 0.1.0 2024-04-14 18:43:52 -04:00
testing.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
Thread.zig Fix WASI threads, again 2024-04-22 15:27:05 -07:00
time.zig std: promote tests to doctests 2024-03-21 14:11:46 -07:00
treap.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
tz.zig
unicode.zig compiler: implement analysis-local comptime-mutable memory 2024-03-25 14:49:41 +00:00
Uri.zig std.http.Client: always omit port when it matches default 2024-04-12 22:37:07 -07:00
valgrind.zig
wasm.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
zig.zig std.zig.fmtId: conditionally escape primitives/_ 2024-04-07 14:47:10 +02:00