Live data from Hacker News

Benchmarking shared memory vs message passing on OS X

blog.antoniofrighetto.com

11–20 of 28 posts

Re: Benchmarking shared memory vs message passing on OS X

#13
As a benchmarking guy, this is pretty basic. You might take a look at lmbench, it's open source, you could use all the timing infrastructure it provides and provide much better results. Reading that code would be educational (and it's very small).

Paper here: http://mcvoy.com/lm/bitmover/lmbench/lmbench-usenix.pdf

BTW, if someone has a better starting point, please share. lmbench is just what I happen to know.

Re: Benchmarking shared memory vs message passing on OS X

#14
Title should be:

"Benchmarking OS X semaphores vs message passing".

Shared memory + spinlocks should be much faster than shared memory + semaphores (much faster, if implemented properly, e.g. spinlock + timeout, on timeout queue another message, again spinlock and try to copy all the elements, etc.).

Re: Benchmarking shared memory vs message passing on OS X

#16
It looks like what you are actually timing is the time it takes to start a process - time for either communication method should be on the order of microseconds or less. For better results, start the two processes first, then measure how long it takes to send a message from process a to b and back to a.

Re: Benchmarking shared memory vs message passing on OS X

#17

It is not really benchmarking. And not really about shared memory. Sorry for being rude.

It is rude. You can say "I don't consider this benchmarking; benchmarking would be XXX" etc. Just to say "you failed" says more about you than this article (which does need work).

Re: Benchmarking shared memory vs message passing on OS X

#18

Sidebar: Apple's desktop operating system hasn't been called OS X for almost a year. There are no graphs, how is this a benchmark?

Why does a graph define a "benchmark"? A table of data is equivalent to a graph. He only has four datapoints anyway, and the deltas are so small that a graph would be deceptive.

BTW a literal mark on a bench is just that.

Re: Benchmarking shared memory vs message passing on OS X

#20

Earlier quoted context omitted.

macOS.

Really?? I remember macOS. https://upload.wikimedia.org/wikipedia/en/thumb/b/b9/MacOS_o...

That's Mac OS.

Mac OS -> Mac OS X -> OS X -> macOS.

https://en.wikipedia.org/wiki/Classic_Mac_OS

Post reply on HN