Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xnacly
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
Handrolling ISO8601 Duration Support for Go
(xnacly.me)
4 points
by
xnacly
1y ago
|
0 comments
32.
▲
by
xnacly
1y ago
Well i guess thats what you get for using mcp instead of just opening the article and reading it
33.
▲
by
xnacly
1y ago
You are somewhat right, I used tagging masks to differntiate between different types of atoms [1]. But yes, interning will be backed by a correct implementation of a hashmap with some collision handling in the future. [1]: https:/
34.
▲
by
xnacly
1y ago
I havent written a lot, but it needs to be fast so i can be motivated to program more by the fast iteration
35.
▲
by
xnacly
1y ago
Sadly that was one of the things I did benchmark, but didn't write down the results. I read a lot that naive switch is faster because the compiler knows how to optimise them better, but for my architecture and benchmarks the computed g
36.
▲
by
xnacly
1y ago
Most of them, jump tables work in rust, mmapping too. deferred numeric parsing, keeping allocations to a minimum, string slices, interning and inline hashing all work in rust, go, c, c++; you name it.
37.
▲
Strategies for Fast Lexers
(xnacly.me)
180 points
by
xnacly
1y ago
|
82 comments
38.
▲
by
xnacly
1y ago
Several possible reasons: - parallelism - concurrent machine code gen - different optimisations for different runs, producing differing machine code order, etc
39.
▲
by
xnacly
1y ago
sigma types, hmmm
40.
▲
by
xnacly
1y ago
It wont work because gov has no interest in not knowing which service the user is trying to authenticate themself to, it is in its interest to connect these informations. We see exactly these attempts every 2-4 years in the eu parliament.
41.
▲
by
xnacly
2y ago
I am not a native english speaker so I often forget to uppercase the 'I's
42.
▲
by
xnacly
2y ago
Thanks, i tried to go for a mimimalist cyberpunk inspired vibe - thus far i like it :)
43.
▲
by
xnacly
2y ago
Hi, author here, I just added the JSON macro to omit the quotation escaping around object keys and strings: without JSON macro: char* j = "{ \"key\": [\"value1\", \"value2\"]}"; with JSON macro: char
44.
▲
by
xnacly
2y ago
Hi, author here, definitely, allocating elements while parsing is slow, especially calling realloc for each new element encountered, a growing array backed by an arena would be my go to if i had to overengineer this one.
45.
▲
by
xnacly
2y ago
Hi, author here, i use the 'type' field of the json_value struct, strings, object keys, object values and array members are allocated, i use this info for freeing the memory
46.
▲
Syntax Highlight for SQL in Diagnostic Errors
(xnacly.me)
1 points
by
xnacly
2y ago
|
0 comments
47.
▲
Highlighting Parts of Lua as Bash
(xnacly.me)
22 points
by
xnacly
2y ago
|
1 comments
48.
▲
by
xnacly
2y ago
It just mentions a loop, so id say for a loop without any content, it should be less than 50ms, but as the other commentor said, it depends on your hardware and a better measurement is to compare relatively
49.
▲
by
xnacly
2y ago
According to the documentation it evaluates by walking the ast, so yes, this is considered very slow. The readme also mentions 1 million loop iterations in 0.14s (140ms). Even my unoptimised naive lips like language [1] (also implemented vi
50.
▲
Optimizing libjson, or: beating encoding/JSON by at least 2.5x
(xnacly.me)
3 points
by
xnacly
2y ago
|
0 comments
51.
▲
by
xnacly
2y ago
Yeah but thats a good thing :)
52.
▲
by
xnacly
2y ago
Can you elaborate?
53.
▲
Embedding Lua in Sqleibniz with Rust
(xnacly.me)
59 points
by
xnacly
2y ago
|
2 comments
54.
▲
by
xnacly
2y ago
I feel like no other embedded scripting language will ever surpass lua. Neovim, roblox and all my projects that needed scripting support use lua, its my first choice.
55.
▲
Making SQL Keyword Suggestions Work
(xnacly.me)
2 points
by
xnacly
2y ago
|
0 comments
56.
▲
by
xnacly
2y ago
It specifically says ns/op, go test executes the operation many times and calculates the average execution time for one operation: https://pkg.go.dev/testing#hdr-Benchmarks
57.
▲
Optimizing a Go Package by 38147125738.8x
(xnacly.me)
2 points
by
xnacly
2y ago
|
2 comments
58.
▲
I love Rust for tokenising and parsing
(xnacly.me)
8 points
by
xnacly
2y ago
|
0 comments
59.
▲
by
xnacly
2y ago
I get that, i still dont like to write f5(f4(f3(f2(f1())))) instead of writing f1().f2().f3().f4().f5()
60.
▲
Fun with Go Iterators
(xnacly.me)
161 points
by
xnacly
2y ago
|
137 comments
More ›