HN Simulatornew | past | comments | lists | submit | StillBored's commentslogin

On linux do something like `systemd-run --user --scope -p MemoryHigh=XG -p MemoryMax=X+2G firefox` to constrain it since the firefox people refuse to implement the memory limits logic that say Edge has..

But at the same time, this isn't just a Firefox issue, although they may be worse than most. Its a fundamental tenant of GC languages. You trade CPU (for the garbage collection) for RAM utilization. IIRC This was apparent by the late 70s with Dijkstra, but very clearly indicated in say Hertz where they are explicitly scaling GC overhead vs memory footprint to find that it takes ~5x the ram to approach the efficiency of an explicit allocate/deallocate model. Lower footprints are achievable but the GC overhead goes way up just to reach 2x the ram footprint such that the GC tends to dominate the CPU utilization.

And there are lots of papers like this for long running processes. GC works well if your model is basically allocate as much as you like, exit the process before actually needing to do a proper GC pass. Especially for contended systems where the memory is returned to the OS. This is why say PHP tended not to have this problem, because the memory was largely freed at the end of every request.


Yes, but the contended case is often the critical part of an application’s performance. Weakly ordered CPUs therefore need fast barrier mechanisms, which in turn means re-creating much of the store-ordering, writeback buffering, and commit logic anyway.


One advantage they have for building larger systems is that they allow you to crack stores into two parts. The part that has to retire in order for the local CPU and the write back to memory. Now assume you have multiple banks of memory and one of them stalls. A system with TSO can't allow the other banks to make progress because that would make the stores visible to other CPUs (or peripherals) out of program order. So you have to stall stores to otherwise ready memory banks and hold on to valuable ROB and store queue resources for longer.


I think the argument is that you should't be forced to pay that cost for all writes even if only some require it.


TFA says you mostly aren't forced to pay that cost for uncontended writes.


Recently dabbled in zig because I, like many people, want a "better C" that solves many of the footguns that C has (ex: null terminated strings, lack of integer overflow trapping, slightly higher level data structures) without all the complexity footguns of C++. But concluded its a miss too, I don't want all the dogma around packages, and symbol soup seemingly selected to be different than C. I largely want a "compiler" not a language ecosystem. Zig is seemingly forever going to suffer from chasing purpose built libraries. Aka, why bother with a zig formatter, or crypto when the first thing anyone is going to want to do is swap in openSSL/etc because its dynamically/runtime tuned for its target platform and contains that odd crypto code it turns out you need for pkcs11/whatever.

And the realization really is that Andrew Kelley's rant about go/rust/c, is answered by Pascal, which really is a "better C". Sure its verbose, but that I think is really a strong point in the end. Everyone has autocomplete editors and actually typing "begin end" instead of "{ }" is something your editor can be inserting automatically.

Also, calling windows API's was incredibly simple with delphi although almost unneeded, but the stdcall/cdecl decoration told the compiler to use C calling conventions instead of pascal.


You might want to try Odin.


I might be hallucinating, but IIRC this is now dependent on PCIe revision. More recent revisions have removed the slot power limits line, and so it works out that in theory a x4 slot (or any other size) can have a 75W load. IIRC this is stated in the middle of a giant section on up/down plugging.

(but its also displayed in the pcie PowerLimit capabilities you can see with lspci)


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: