Post
Topic
Board Bitcoin Discussion
Merits 33 from 1 user
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
kTimesG
on 04/06/2025, 18:27:15 UTC
⭐ Merited by AlexanderCurl (33)
Locking the batch compared to locking just bf.insert is faster time-wise.

This probably depends on the batch size. Since the atomic lock is basically just a clock cycle, this might indicate that multiple cores are often accessing overlapping RAM areas, forcing I/O between CPU caches and main memory.

I think a synchronized queue fits better, and it fills the compute pipeline. Add the hashed pubKeys to the queue (and signal addition), consume them from an auxiliary thread (using signaled events). This ensures no false sharing of L1 cache occurs, and no threads get blocked (unless the queue itself goes OOM). Cheesy