diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-23 15:16:04 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-27 11:44:07 +0200 |
| commit | 03b645f22bfc7afadc5a8aa6d59edf0eba74a048 (patch) | |
| tree | dda64286a408e104879be2544f9c7dc8aa8e333a /README.md | |
| parent | 6836db9b00d4f13a78a53cc5bdb0b63028188b55 (diff) | |
cleanup & json string simd parsing
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -6,9 +6,9 @@ - Fix tests in release - Static functions for private? - `valgrind --leak-check=full ./your_program` -- assert with error msg? - negative numbers - web server, Json parsing, struct codegen +- what is a const char * ## Benchmarks @@ -19,6 +19,19 @@ |no 0 mem alloc|299 ms ± 8 ms per loop (mean ± std. dev. of 10 runs, 1 loop each)||| |Str_view|272 ms ± 6 ms per loop (mean ± std. dev. of 10 runs, 1 loop each)|330.46 MB/s|1255 MB| +```c +void print_bytes(byte_32 *data) { + for (i32 i = 0; i < 32; i++) { + byte c = ((byte *)data)[i]; + if (c >= 32 && c <= 126) { + printf("%c", c); + } else { + printf("."); + } + } +} +``` + ## Resources - https://nullprogram.com/blog/2023/10/08/ |
