HackerLangs
TopNewTrendsCommentsPastAskShowJobs

nly

11,436 karmajoined il y a 13 ans

Submissions

The Advent of Compiler Optimisations 2025

xania.org
3 points·by nly·il y a 8 mois·0 comments

comments

nly
·hier·discuss
What was the one time when you need something wait free? I'm assuming interacting with hardware?
nly
·hier·discuss
What's important is you know the trade-offs you are making.

You can't have a bounded queue that is always non-blocking because slow consumers can block producers.

You can't have a global FIFO order + multiple producers without slow producers blocking consumers.

You can't have a global FIFO order + have have non-atomic reserve and commit without a interrupted/de-scheduled producer thread being able to block the consumer

If you want atomic commit then you lose separate reserve which means either unbounded memory or atomic fixed-size data with sentinel values, ABA problems etc.

There are trade-offs everywhere, and it's best to pick the data structure that fits your needs just like any other problem.
nly
·hier·discuss
The MPSC/MPMC structure in Aeron is wait-free with respect to producers - one producer cannot block another

There are simple node based algorithms that achieves a similar guarantee:

https://web.archive.org/web/20240928080729/https://www.1024c...

There is also a MPMC algorithm on this site very similar to the article

https://web.archive.org/web/20220524214823/https://www.1024c...
nly
·avant-hier·discuss
I think of that movie every time I hear the song! That was one badass robot sequence.

"Suuuuure. Kidnap the humans, DESTROY THE MACHINE."
nly
·il y a 6 jours·discuss
Time to comb the desert until more are found.
nly
·il y a 10 jours·discuss
Theres no technical reason one should look better than the other.

Both should use multipass ahead of time compression with a rate control algorithm, and both should have enough slack streaming bandwidth to handle complex scenes with buffering
nly
·il y a 10 jours·discuss
My British parents went there this year and found it very expensive
nly
·il y a 10 jours·discuss
Cool trick given both companies are US entities.
nly
·il y a 10 jours·discuss
In well thought out C++ software lifetime rarely becomes an issue because deciding on ownership and object lifetime is unavoidable as part of the design process.
nly
·il y a 11 jours·discuss
If the code is mapped readable and not mutated how does it make a difference?

The code will be prefetched in to local (executing) CPU cache just the same. No invalidations will take place across NUMA zones.

Modern DLLs on e.g. Linux use PIC and not mutable relocations.
nly
·il y a 11 jours·discuss
Ironically most of the polish I know who came to Britain returned home to Poland for better prospects.

Adjusting for purchasing power parity, GDP per capita in Poland isn't far behind the UK.
nly
·il y a 12 jours·discuss
Because it's accurate?

If I have access to your digital ID I shouldn't be able to impersonate you anymore than I should be able to fly using your passport.

Your passport is useful not just because it's difficult to forge, but because border control is a thing.
nly
·il y a 12 jours·discuss
Yeah...I'm fully aware what a ZKP is..you're just missing the point.
nly
·il y a 12 jours·discuss
Doesn't matter!

You still need to send a digital image from the id, signed by an authority, saying "this person is 18"

You then still need a trusted ID service or algorithm to capture an image of the user _at the time of use_ to compare that to.

Just having access to your digital ID credentials proves nothing

The zero knowledge proof only helps prevent tracking between the ID service and the website you're logging into. This is valuable but requires standardisation and client side support, which doesn't exist.

All the time the client side is implemented by JavaScript served from the server side you're just trusting these parties to behave and not snoop
nly
·il y a 12 jours·discuss
But to be effective you need to prove that the person presenting the ID is the person the ID belongs to.

In person that falls to a human being, and it's an easy and intuitive task that takes seconds.

On the internet this involves some kind of video recording being sent to some agency somewhere being paid a fee, who may later be asked to prove the efficacy of their service. This agency needs a digital copy of the photo from your ID for matching purposes. They'll be tempted to store this for auditing purposes... they'll also be tempted to store correlation IDs etc if the architecture allows.

The issue is trust. You just can't trust these first and third parties not to collaborate for commercial gain or at government demand or request.

And ultimately you're still exchanging verification at registration for a shareable credentials: I could use my ID to sign up to pornhub premium and then sell the username and password to a 16 year old if I wished, just like those buying alcohol can go and give it to the underage. A black market for digital credentials is even easier to establish than material goods
nly
·il y a 12 jours·discuss
> However, I've heard that in HFT, they don't do that because the overhead itself is too costly.

I've worked at several HFTs and 2 had independently settled on 64bit signed fixed point with a implied 10^9 scaling factor between internal systems.

However in-process one just used 'double' for all FX conversions, scaling etc. With 15 digits of precision and careful rounding choices it's fine.

Dealing with the outside world you'd obviously just convert as cheaply as possible - and there are some crazy fast algorithms doing fast binary float -> correctly rounded decimal conversions these days
nly
·il y a 12 jours·discuss
I worked on a trading system dealing with transaction limits expressed in USD but trading in many currencies.

FX rates and prices were expressed in fixed point because it was more efficient to handle in FPGA. A lot of thought went in to making the system accurate enough based on real FX rates while falling on the right side of the limit
nly
·il y a 13 jours·discuss
It's not great.

Rapidhash is just insanely fast and provides good distribution, with built-in support for mixing.
nly
·il y a 14 jours·discuss
My goto these days (and afaik the state of the art) is boost::unordered_flat_set paired with rapidhash for hashing (since the GNU std::hash functions based on murmurhash are ridiculously slow)

The cacheline performance is pretty hard to beat (SIMD optimised linear scan before hopping), which is where all the wins come in the real world.

But basically any of the faster hash maps from absl, boost or folly are going to wreck the standard library in terms of perf
nly
·il y a 15 jours·discuss
Been using a VPN on my phone and PC for 20 years. Always use non-UK exit points