Arseny Kapoulkine, a graphics and engine programmer who worked at Roblox, writes on rendering, C++ performance and low-level optimization.
HN commenters call his Eight Years at Roblox post excellent and discuss his technical posts on Qgrep, Proebsting's Law and condition variables.
Why would you respond to my post but ignore all the points I made? Do you just want to rant?
I explained why it doesn't matter that "C lacks basic primitives...". C has the basic primitives. It lacks generalist containers, for example. But most of those 'generalist containers' are, as I already explained, just not very good. For example, take this post:
https://zeux.io/2023/06/30/efficient-jagged-arrays/
What do we see here? The guy starts off with basically 'normal C++' and what he has at the end if essentially something you could write in C. When you optimise C++, you end up getting C. He has two std::vectors, but they're pre-sized so they're essentially the same as writing 'unsigned offsets = calloc(vertex_count + 1, sizeof offsets);'. This is not any kind of significant boilerplate.
The low-level details are something you NEED to concentrate on. If you don't care about the low-level details, then you shouldn't use C or C++. That's the point of low-level languages: control over low-level details.
All complex low-level programs are written in C. C is used in every production operating system kernel. C is the language in which systemd is written. It's the language in which pretty much every production web server or network server is written in. It's the language used by pretty much everyone interfacing with hardware.
The Linux kernel isn't an exception. It is the typical case.
>And what about the drawbacks mentioned on the article? 99% of programmers…
> Doubt ripgrep it will beat indexing, line GNU id-utils. (mkid to build ID file, lid to query).
Does it provide the same user experience? i.e., Does it keep the index up to date for you automatically? If so, that's something a lot of users aren't willing to pay for.
If you want a pre-indexed solution, I'd recommend checking out qgrep instead: https://zeux.io/2019/04/20/qgrep-internals/
> If you're using git, "git grep" is useful; it searches only files indexed in git, which provides a useful speedup.
Depends on what you're searching. In a checkout of the Linux kernel:
$ time LC_ALL=C git grep -E '[A-Z]+_SUSPEND' | wc -l
3707
real 1.033
user 5.769
sys 0.592
maxmem 63 MB
faults 0
real 1.033
user 0.000
sys 0.008
maxmem 9 MB
faults 0
$ time LC_ALL=en_US.UTF-8 git grep -E '[A-Z]+_SUSPEND' | wc -l
3707
real 3.624
user 21.910
sys 0.404
maxmem 64 MB
faults 0
real 3.623
user 0.000
sys 0.008
maxmem 9 MB
faults 0
$ time rg '[A-Z]+_SUSPEND' | wc -l
3707
real 0.138
user 0.767
sys 0.704
maxmem 21 MB
faults 0
real 0.138
user 0.003
sys 0.006
maxmem 9 MB
faults 0
This is even despite the fact that `git grep` already has a file index (ripgrep
has to process the >200 `.gitignore` files in the Linux repo for every search)
and the fact that `git grep` is also using…
I'm shocked there's so much push back on this here. This was written in 2019 but it applies even more so today. All the recent advances in AI for the past decade have, as a base requirement, massive amounts of compute. Not a proof but it should be a big red flag that if you don't believe Sutton, you should maybe consider.
Put it this way. Do you believe premature optimization is the root of all evil? Then why do you believe that some subtle, intricate optimization for machine intelligence will win out over brute compute force? It's not that there's optimizations to be done, it's knowing what optimizations will yield the most value after the space is explored with better computing capabilities.
To me, this is almost like a generalized "Proebstings Law" [0], where compiler optimizations give a doubling every 18 years compared, to say, some type of generalized Moore's law which give roughly a doubling in compute every 1.5 to 2 years.
[0] https://zeux.io/2022/01/08/on-proebstings-law/
Not necessarily, since it's in production they might be hoping for a bit of securty-by-obscurity if they haven't had time to get an audit the code (runtimes are always hard to get 100% correct since they're so generic, esp for a language such as Lua).
Seems like this runtime was announced to Roblox developers almost a year ago. But i don't think they've put much thought or effort into open sourcing it and it just happend to pop up in peoples feeds now since Arseny published an article(#1) about his 8 years working for Roblox 2 days ago and somebody probably took the link from that article (Quite an interesting read if you're into gamedev).
#1 , https://zeux.io/2020/08/02/eight-years-at-roblox/
in the "closing thoughts" [1] of the OP article there's a pointer to "Proebstrings law" [2] which got me to a benchmark [3] how LLVM has improved over 10 years from 2.7 to 11
which leaves me with the strong intuition that indeed what mit benefit more from a rethink is not optimizers but focus on programmer productivity
> Perhaps this means Programming Language Research should be concentrating on something other than optimizations. Perhaps programmer productivity is a more fruitful arena.
[1] https://typesanitizer.com/blog/rethink-optimizers.html#closing-thoughts
[2] https://proebsting.cs.arizona.edu/law.html
[3] https://zeux.io/2022/01/08/on-proebstings-law/
1. Arrays ≠ Everything. Please stop with the straw men.
2. "Compiler Advances Double Computing Power Every 50 Years, And The Interval Keeps Growing". (i.e. even Probsting was wildly optimistic when it comes to the benefits of compiler research). The benefits of these shenanigans are much less than even the critics thought, never mind what the advocates claim. They are actually small and shrinking.
https://zeux.io/2022/01/08/on-proebstings-law/