I've done some benchmarking on JSON -> in-memory borrow structs and it was pretty darn impressive while being fairly ergonomic to use compared to a streaming parser.
14,277 karma · joined March 19, 2015
I've done some benchmarking on JSON -> in-memory borrow structs and it was pretty darn impressive while being fairly ergonomic to use compared to a streaming parser.
Back when I was in industry we all knew what everyone else was working on including big IPs and next gen console stuff. That might have also been a factor of how small and tight nit of an industry it was.
I wish it was different since you can do things with ham radio that are not possible without a license but then I look at the state of something like APRS that is still stuck in the '80s and it's depressing. The M17 project may change that and FT8 is starting to make inroads but I feel like the attitude you mention above keeps out people who would be taking it to new places and domains.
Tons of fun problems and passionate people but the industry is an absolute meat grinder. Last I looked at the statistics median industry career length was ~3 years.
In my time in that industry the only bonus/non-salary compensation I ever saw was a $20 Starbucks gift card for pulling a 90hr week before a major demo deadline.
You can do do fun things like using radix sort with bucket sizes that line up well with L2/L3 caches(saw a multi order of magnitude speedup for that one) and data aware layouts that net 10-30x speedups for the same data. Many RMDBs use similar approaches from what I understand as well.
There's things they do well but I don't know if I'd qualify them as having better reliability.
https://arstechnica.com/cars/2021/09/rivians-67-500-314-mile...
Half of games networking is finding out what you can "get away with" from an impact/user perception. Ex: play hit effects, sounds in a de-synched way locally but have major game events be authoritatively acked by the server, the local events also do a good job of masking the latency. The other half is really cool tricks like dead-reckoning or lock-step[1] which uses a completely deterministic game state to sync hundreds of entities over latent connections.
It's a really fun design space that's leverages heavily both the game design(designs where players "predict" are easier to keep in sync/fun), a level of deception to hide latency and cool technical approaches to hard problems in a non-deterministic environment.
I don't have the spec handy but fairly certain that v-table implementation is compiler specific and while it may work it isn't guaranteed. However if you declare the function symbols as dynamic then you can leverage the linker to dynamically resolve the right symbols with the matching opaque data and achieve binary compatibility(assuming you use the same compiler or a compatible compiler ABI and all other caveats around C++ binary compatibility).
I've seen impressive things done with Lua, from literate AI programming with coroutines to building compostable component based language constructs instead of standard OOP. You have things like GOAL[1] which ran on crazy small systems (the Lua I saw ran in a 400kb block as well).
On performance, data oriented design and efficient use of caches is the way you get faster. I've done it in Java, I've done it in C#, I've done it in Rust and C++. Certain languages have better primitives for data layout and so you see gamedev index into them. We used to do things like "in-place seek-free" loading where an object was directly serialized to disk and pointers were written as offsets that were fixed up post load. Techniques like this easily net 10-30x performance benefits. It's the same reason database engines run circles around standard language constructs.
[1] https://en.m.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp
I agree on the performance aspect, any inner-loop stuff always was down in a native language or heavily JIT'd path, but even then data layout drove it even more which usually required structuring the upstream systems ahead of the core logic. It's the reason why there's no "one-size fits all" game engine. They all make very discrete trade-offs in terms of entity counts, open world vs constrained layout and the like.
If you want to go fast in this space then you need to care about data layout and how the system is structured end-to-end. Calling a function per object is going to hit a wall regardless of how you schedule.
Hundreds/Thousands of updates is not small but it's also not massively impressive either. I've done ~2,800 node scene graphs on underpowered ARM chips back in '09 at 60FPS including rendering. You have to use NEON, and be aware of your caches. No scheduling magic is going to change that unless you're just deferring work which sounds like what may be happening there.
FWIW I've also done this in Java via FlatBuffers(which uses ByteBuffer internally) to keep data coherency when driving animations frames so it doesn't require dropping down to C/C++/Rust(although C#'s value types do make it easier).
[1] https://www.amazon.com/Showstopper-Breakneck-Windows-Generat...
[2] https://www.amazon.com/Dealers-Lightning-Xerox-PARC-Computer...
Like the article says it sounds unreal and almost to suspend disbelief, however if you independently look up the major events outlined they pencil out.
Someone still hasn't built an equivalent to LuaJIT. Quickjs is in the same spirit but still interpreted, the way LuaJIT does C FFI is just pure awesome[1].
Even a 5% speed increase is nothing to discount give that it's "free" once they have LLVM handling it correctly. I agree with the conclusion that if you have to manage the aliasing manually it's very limited in scenarios where you would want to deploy that given the failure modes of getting it wrong.