21 karma · joined Nov 28, 2024 (2y ago) · 59 submissions
comment 1y ago · link · parent
comment 1y ago · link · parent
Although the numbers above are close, it does not make much sense to me that a chip with more CPUs will be faster on single thread performance than the same chip with less CPUs. But I can be wrong.
Also, according to their list, even the M3 8 Core beats the M4 chips (Pro and Max included). Again on single thread performance. Am I missing something?
Am I missing something or the M3 for single thread performance is faster than the M4?
I can't emphasize enough that I'm only talking about single thread performance here.
comment 1y ago · link · parent
According to PassMark CPU Benchmarks, a trusted source, updated frequently, the M3 Max 16 Core is the fastest single thread cpu with a score of 4,785, followed by the M3 Max 14 Core with a score of 4,771.
Although the numbers above are close, it does not make much sense to me that a chip with more CPUs will be faster on single thread performance than the same chip with less CPUs. But I can be wrong.
Also, according to this list, even the M3 8 Core beats the M4 chips (Pro and Max included). Again on single thread performance.
Am I missing something or the M3 for single thread performance is faster than the M4?
I can't emphasize enough that I'm only talking about single thread performance here.
37.
CPUBenchmark.net says M3 is faster than all M4s on single thread performance(cpubenchmark.net ↗)
11 points · by joas_coder · 1y ago · 16 comments
comment 1y ago · link · parent
comment 1y ago · link · parent
For the non-blocking ring, the producer never blocks on a full ring. It overwrites the circular ring. The consumer can still block on an empty ring.
So to make it clear:
Blocking ring => producer and consumer can block/wait
Non-Blocking ring => producer never blocks and consumer can still block on an empty ring. Consumer can also fall behind too much and disconnect.
40.
Developing Java applications without the Garbage Collector [video](youtube.com ↗)
3 points · by joas_coder · 2y ago · discuss
comment 2y ago · link · parent
comment 2y ago · link · parent
So are you saying that POLL was a bad choice of name because polling means "check if there is something available and if there is get it"?
What would be a better name? How about availableToFetch and fetch? Any other better idea?
I don't like remove because you are not actually removing the object from the ring.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
Your transfer object needs to implement MemorySerializable. Below two examples from CoralRing's GitHub:
https://github.com/coralblocks/CoralRing/blob/main/src/main/...
https://github.com/coralblocks/CoralRing/blob/main/src/main/...
The second one effectively allows you to send anything you want (as bytes) through the ring, making CoralRing message agnostic.
comment 2y ago · link · parent
The DiamondQueue should be soon available for free at the CoralQueue project on GitHub.
comment 2y ago · link · parent
You busy spin when blocking (fastest) or you can use a WaitStrategy from https://www.github.com/coralblocks/CoralQueue. You can see an example here: https://github.com/coralblocks/CoralQueue/blob/main/src/main...
> And given these are designed for "ultra-low-latency" systems, I don't think that's a big problem because the best blocking strategy is probably just to spin.
If you have an isolated and dedicated CPU core for your thread, that's correct. Busy-spinning is the fastest/best strategy.
> It would be nice if the docs were nicer though, considering this is a paid product...
CoralRing and CoralQueue are open-source and free at GitHub. There are also a lot of documentation and explanations on the GitHub README.me page (front page). The code has also a lot of comments.
comment 2y ago · link · parent
You are never supposed to call poll() without first calling availableToPoll(). How can you poll something if you don't know if there is something available to poll? This is very different than a ConcurrentLinkedQueue where you can call poll() on an empty queue and get a null to indicate that the queue is empty. Also because the ring is a circular queue, you have to know what you can safely poll before polling. That's all done through availableToPoll().
NOTE: By garbage here I don't think you are talking about GC garbage.