frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

An analysis of recent multithreading improvements for a smoother game

https://dev.arma3.com/post/oprep-performance-optimizations-in-220
41•diggan•3d ago

Comments

hinkley•1h ago
> The design of the job system decides how we are able to utilize it, and the old design (in use since Arma 2) worked, but it was quite primitive. It only allowed submitting jobs as one block, and there could only be one block active at a time. This means all jobs had to be submitted at once, after which we needed to wait for the jobs to be finished, before we could continue doing other things.

> This is also called "Fork-Join".

I removed one of these from a batch processing system and got about 3x the throughput in the process.

As it was written, the system was trying not to be a noisy neighbor for online (consumer-facing) traffic and was not succeeding. It could still cause brownouts if too many other things were running at the same time. So the authors thought to have the users run Splunk queries, looking for traffic from these other jobs, to see if it was safe to run the CI/CD pipeline. That's ridiculous. It's the sort of thing someone Ops-facing forgets that nobody else on the team gives a shit about most days.

If we wanted people to be able to run it without consequence, it needed to go quite a bit slower, but it was already more than half of the wall clock time being spent in a runbook as it was. So I replaced it with a queue instead, that would have n tasks running all the time, instead of up to n and as few as 1. I ended up being able to tune it to about 75-80% of the original number with little problem. Well, one problem. There was one group of customers whose assets generated about 10x the load of any other customer, and the way we queued the work clustered by group. Once I sorted by customer instead of group we stopped getting a clustering of excess workload, and it also made it a hell of a lot easier to eyeball the status messages and estimate how far along you were.

Spiky processes cause problems for both load-shedding and autoscaling schemes. And starting too many tasks at once causes memory pressure on your end, since most data processing tasks take more memory in the middle than at the beginning or the end. You are better off self-throttling your traffic so you make the memory load more sequential and you allow compensatory systems the time they need to adapt appropriately to your sudden peak of traffic.

o11c•1h ago
Unrelated to the specific game:

Note that the "can't parallelize AI/scripting" is a consequence for a design choice that many people make without thinking - namely, that all actors should, internally, have perfectly accurate and up-to-date knowledge of the world, using the same in-game global objects.

If each actor makes a copy of the world for what they know, there's nothing preventing parallelism. This does imply quadratic memory, but you can just cap this - if there's a lot going on, it makes sense for an actor to lose track of some of it. And once you're working with imperfect knowledge, you can just ... throttle the AI's think time if it's doing too much.

Another thing you can do, assuming you already have suspendable scripts, is "merge" the thread affinity of two scriptable objects when you know they need to interact (only really needed for transaction-like things; often you can just emit some async state to be resolved later). Actually, you don't need to suspend if you have enough static analysis, but suspending is probably actually the easier thing to do.

Related to this, IMO it's a mistake to expose functions to the scripting API that access state implicitly. It's a better design to expose objects (that can only be accessed/mutated if passed as an argument) - and to expose a different set of objects depending on what context the script is called in. A type-checker is really useful here.

dustbunny•32m ago
Another model may be that all actors read from frame N-1 and write to frame N. Then there's not many copies, just one.

AbsenceBench: Language models can't tell what's missing

https://arxiv.org/abs/2506.11440
27•JnBrymn•32m ago•2 comments

Phoenix.new – Remote AI Runtime for Phoenix

https://fly.io/blog/phoenix-new-the-remote-ai-runtime/
332•wut42•8h ago•148 comments

Wiki Radio: The thrilling sound of random Wikipedia

https://www.monkeon.co.uk/wikiradio/
29•if-curious•1h ago•2 comments

Show HN: Inspect and extract files from MSI installers directly in your browser

https://pymsi.readthedocs.io/en/latest/msi_viewer.html
53•rmast•2h ago•9 comments

Visualizing environmental costs of war in Hayao Miyazaki's Nausicaä

https://jgeekstudies.org/2025/06/20/wilted-lands-and-wounded-worlds-visualizing-environmental-costs-of-war-in-hayao-miyazakis-nausicaa-of-the-valley-of-the-wind/
153•zdw•7h ago•48 comments

Show HN: Nxtscape – an open-source agentic browser

https://github.com/nxtscape/nxtscape
170•felarof•6h ago•132 comments

Harper – an open-source alternative to Grammarly

https://writewithharper.com
38•ReadCarlBarks•3h ago•13 comments

Verified dynamic programming with Σ-types in Lean

https://tannerduve.github.io/blog/memoization-sigma/
37•rck•3d ago•8 comments

Dancing Naked on the Head of a Pin: The Early History of Microphotography

https://publicdomainreview.org/essay/dancing-naked-on-the-head-of-a-pin
33•crescit_eundo•2d ago•0 comments

Cracovians: The Twisted Twins of Matrices

https://marcinciura.wordpress.com/2025/06/20/cracovians-the-twisted-twins-of-matrices/
49•mci•6h ago•24 comments

The JAWS shark is public domain

https://ironicsans.ghost.io/how-the-jaws-shark-became-public-domain/
104•MBCook•3h ago•16 comments

Tuxracer.js play Tux Racer in the browser

https://github.com/ebbejan/tux-racer-js
65•retro_guy•6h ago•27 comments

Libraries are under-used. LLMs make this problem worse

https://makefizz.buzz/posts/libraries-llms
28•kmdupree•1h ago•22 comments

Jürgen Schmidhuber:the Father of Generative AI Without Turing Award

http://www.jazzyear.com/article_info.html?id=1352
55•kleiba•3h ago•25 comments

Alpha Centauri

https://www.filfre.net/2025/06/alpha-centauri/
51•doppp•6h ago•16 comments

Oklo, the Earth's Two-billion-year-old only Known Natural Nuclear Reactor (2018)

https://www.iaea.org/newscenter/news/meet-oklo-the-earths-two-billion-year-old-only-known-natural-nuclear-reactor
155•keepamovin•13h ago•68 comments

Smartphones: Parts of Our Minds? Or Parasites?

https://www.tandfonline.com/doi/full/10.1080/00048402.2025.2504070
24•cratermoon•3h ago•3 comments

A Python-first data lakehouse

https://www.bauplanlabs.com/blog/everything-as-python
89•akshayka•3d ago•24 comments

BYD begins testing solid-state EV batteries in the Seal

https://electrek.co/2025/06/20/byd-tests-solid-state-batteries-seal-ev-with-1000-miles-range/
52•toomuchtodo•2h ago•52 comments

Ancient termite poo reveals 120M-year-old secrets of Australia's forests

https://phys.org/news/2025-06-ancient-termite-poo-reveals-million.html
11•janandonly•2d ago•0 comments

AMD's Freshly-Baked MI350: An Interview with the Chief Architect

https://chipsandcheese.com/p/amds-freshly-baked-mi350-an-interview
6•pella•1h ago•1 comments

An analysis of recent multithreading improvements for a smoother game

https://dev.arma3.com/post/oprep-performance-optimizations-in-220
41•diggan•3d ago•3 comments

Show HN: SnapQL – Desktop app to query Postgres with AI

https://github.com/NickTikhonov/snap-ql
81•nicktikhonov•11h ago•45 comments

Klong: A Simple Array Language

https://t3x.org/klong/
100•tosh•10h ago•56 comments

Minimal auto-differentiation engine in Rust

https://github.com/e3ntity/nanograd
51•lschneider•9h ago•6 comments

Finding Peter Putnam

https://nautil.us/finding-peter-putnam-1218035/
8•gcheong•3d ago•1 comments

Career advice, or something like it

https://brooker.co.za/blog/2025/06/20/career.html
64•SchwKatze•4h ago•28 comments

A Brief, Incomplete, and Mostly Wrong History of Robotics

https://generalrobots.substack.com/p/a-brief-incomplete-and-mostly-wrong
91•Bogdanp•4d ago•46 comments

How to Design Programs 2nd Ed (2024)

https://htdp.org
97•AbuAssar•7h ago•21 comments

Show HN: I Built a Site That Curates Weird YouTube Rabbit Holes Daily

https://yourabbit.com
21•bas_sen•8h ago•6 comments