Readit News logoReadit News
j_seigh commented on Why the global elite gave up on spelling and grammar   wsj.com/lifestyle/jeffrey... · Posted by u/matthieu_bl
j_seigh · 2 days ago
It seems almost nobody can spell lose correctly anymore. I assume it's deliberate.
j_seigh commented on Clock synchronization is a nightmare   arpitbhayani.me/blogs/clo... · Posted by u/grep_it
j_seigh · 2 months ago
The comments about HFT needing tightly synchronized clocks got me thinking.

Back in the day, way back in the 80's, IBM replaced the VM with VMXA. VM could trap and emulate all the important instructions since they were privileged instructions except one, the STCK (store clock) instruction. So virtual machines couldn't set their virtual clocks so they were always in sync. VMXA used new hw features that let you set the virtual clock. You could specify an offset to the system clock. But some of IBM's biggest customers depended on all the virtual machines clocks always being in sync. So VMXA had to add an option to disallow setting the clock for specified virtual machines.

Except all of development knew how trivial it was to trap or modify the STCK's to produce a timestamp of you choosing. This was before it was common knowledge the client code should never be trusted. But nobody enlightened IBM corporate management. It was a serious career limiting move at IBM. It didn't matter if you were right. So I'm pretty sure some serious fortunes were made as a result.

So the question for HFT is; are they using and trusting client timestamps, or are the timestamps being generated on the market maker's servers? If the latter, how would the customer know?

j_seigh commented on Clock synchronization is a nightmare   arpitbhayani.me/blogs/clo... · Posted by u/grep_it
j_seigh · 2 months ago
Ok,so people use NTP to "synchronize" their clocks and then write applications that assume the clocks are in exact sync and can use timestamps for synchronization, even though NTP can see the clocks aren't always in sync. Do I have that right?
j_seigh commented on Put a ring on it: a lock-free MPMC ring buffer   h4x0r.org/ring/... · Posted by u/signa11
j_seigh · 3 months ago
I did a lock-free MPMC ring buffer with 1 128 bit CAS and 1 64 bit CAS for enqueue and 1 64 bit CAS for dequeue. The payload is an unrestricted uintptr_t (64 bit) value so no way to avoid the 128 bit CAS in the enqueue.
j_seigh commented on The ABA Problem Cost Us $50K: A Cautionary Tale   lucisqr.substack.com/p/th... · Posted by u/j_seigh
j_seigh · 4 months ago
Paywalled, but if you are familiar with the ABA problem in lock-free programming you can pretty much figure things out.
j_seigh commented on Myths Programmers Believe about CPU Caches (2018)   software.rajivprab.com/20... · Posted by u/whack
j_seigh · 4 months ago
Coherent cache is transparent to the memory model. So if someone trying to explain memory model and ordering mentioned cache as affecting the memory model, it was pretty much a sign they didn't fully understand what they were talking about.
j_seigh commented on Designing EventQL, an Event Query Language   docs.eventsourcingdb.io/b... · Posted by u/goloroden
j_seigh · 5 months ago
How is this different than something like https://www.espertech.com/
j_seigh commented on The Evolution of Garbage Collectors: JVM vs. Go vs. Rust Latency Shootout   codemia.io/blog/path/The-... · Posted by u/ianopolous
j_seigh · 5 months ago
I'm assuming they're using an unbounded MPMC queue. With GC you can use a lock-free queue, otherwise you have to use mutexes, or reference counting which is nearly as bad.
j_seigh commented on Lockless MPSC/SPMC/MPMC queues are not queues   alexsaveau.dev/blog/opini... · Posted by u/SUPERCILEX
j_seigh · 5 months ago
I did do an actual lock-free MPMC ring buffer implementation as an exercise. I used that to make blocking bounded queues using various synchronization mechanisms, mutex/condvars and eventcounts among others. The eventcount version runs about 8x faster than the mutex version.

u/j_seigh

KarmaCake day32May 16, 2025View Original