Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
414owen
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
A faster bump allocator for rust
(owen.cafe)
6 points
by
414owen
4mo ago
|
0 comments
2.
▲
A faster bump allocator for rust
(owen.cafe)
6 points
by
414owen
4mo ago
|
0 comments
3.
▲
by
414owen
9mo ago
Wow, okay. I would imagine this makes mathematicians quite angry? I guess you're responsible for all the operations you use in your proof being well-behaved. It sounds like subtraction over Nats needs to be split into `sub?`, and `sub!
4.
▲
by
414owen
2y ago
Word.
5.
▲
by
414owen
3y ago
re2c works like a charm. I'm generally confident that I couldn't write faster scanners by hand if I tried.
6.
▲
Speeding up tree-sitter-haskell 50x
(owen.cafe)
8 points
by
414owen
3y ago
|
1 comments
7.
▲
by
414owen
3y ago
This code was written a while ago, but I decided it merited a write-up recently.
8.
▲
by
414owen
3y ago
I have DietPi running on a Raspberry pi Zero W (armv6l), which is a system that's supported by barely any distros nowadays. It was easy to preseed, has the absolute bare minimum amount of processes running, and is altogether a fantasti
9.
▲
by
414owen
3y ago
This is pretty much `assembly language the game`: https://tomorrowcorporation.com/humanresourcemachine It's not a useful architecture, but it teaches the thought process really well, and you end up discovering a lot of
10.
▲
by
414owen
3y ago
The array lookup approach taken in part two: https://owen.cafe/posts/the-same-speed-as-c/ But taking the length of the string as a parameter is not, because that changes the problem statement (making the solution
11.
▲
by
414owen
3y ago
Kind words, much appreciated!
12.
▲
by
414owen
3y ago
I guess the question is whether the compiler should optimize a function containing a loop for a single null terminator, or for more data. I would suggest the latter is what you want most of the time. There's also the option of running
13.
▲
by
414owen
3y ago
So I actually did try that, but and IIRC it didn't produce a CMOV with either gcc or clang. I didn't put it in the repo because it wasn't an improvement (on my machine) and I decided not to write about it. Maybe you get diffe
14.
▲
by
414owen
3y ago
That's the thing, a C compiler has all the information it needs to know that the maximum amount of times a '\0' can be processed in the loop is once (because the function returns), but there's no upper bound on the amoun
15.
▲
by
414owen
3y ago
Very interesting approach. I should probably have specified that the somewhat naive assembly in `02-the-same-speed-as-c/loop-5.x64.s` is the fastest version I have. On my machine I'm getting 0.244s for `loop-5.x64.s` and 0.422s fo
16.
▲
by
414owen
3y ago
Nice! There's a part two in which I rewrote the C. I got a 12x speedup :) https://owen.cafe/posts/the-same-speed-as-c/ And as others have pointed out, you can tweak the input, then vectorize the algo, if you
17.
▲
by
414owen
3y ago
The version that's friendly to the compiler is described in part two: https://owen.cafe/posts/the-same-speed-as-c/ It achieves 3.88GiB/s I intentionally didn't go down the route of vectorizing. I wa
18.
▲
by
414owen
3y ago
> because without FDO (or PGO) the compiler has no idea how likely each branch is to be taken So, the maximum amount of times you can hit '\0' is once in the string, because then the function returns, but you can hit the other
19.
▲
by
414owen
3y ago
Yes, I explained in the `Benchmarking setup` section that I used `march=native`, but I guess I forgot to mention I used -O3.
20.
▲
by
414owen
3y ago
I'd probably look for a tech co-founder. Such a small percentage of startups make it, and having a learning-as-you-go tech team will not help those already small chances. That said, passion and curiosity win out in the long run. If you
21.
▲
{n} times faster than C
(owen.cafe)
447 points
by
414owen
3y ago
|
237 comments
22.
▲
by
414owen
3y ago
A clickbait title for an in-depth look at hand-optimizing a very simple loop.
23.
▲
by
414owen
4y ago
I would. A few basic requirements are: git, linux, a desktop computer (or to be allowed to use my own)
24.
▲
by
414owen
4y ago
I'm using lemon to parse a programming language. Lemon produces this report for my grammar: Parser statistics: terminal symbols................... 19 non-terminal symbols............... 42 total symbols...
25.
▲
by
414owen
4y ago
I migrated my main personal project (a programming language written in C) to Tup recently. So far I love it, it seems to 'just work'. Some highlights: No need to map header (or other) files to C files. Tup detects when files are r
26.
▲
by
414owen
4y ago
I think almost everyone who writes Haskell has in the past written in other languages, and clearly those who stick with it prefer it. I'm personally far more productive in Haskell than in any other language I've tried. I don'
27.
▲
by
414owen
5y ago
Helix is my daily driver and it's got such nice defaults I haven't even bothered configuring it. For modern code editing it's just faster. Everything's built in natively.
28.
▲
by
414owen
5y ago
Thanks :) I actually posted https://select.pink/ to HN ages ago, but it died in `new`: https://news.ycombinator.com/item?id=24959045 OP's game has some nice features. The timing is neat, and to be hone
29.
▲
by
414owen
5y ago
Huh, I wrote a very similar game a while ago. Select elements with CSS selectors to get to the next level: https://select.pink/ Mine displays the elements as nested blocks, instead of printing a tree.
30.
▲
by
414owen
5y ago
So, what's the plan? Reimplement every popular extension that doesn't have good performance? > the asynchronous communication between the renderer and the extension-host severely limits how fast bracket pair colorization can be
More ›