erl_ddll vs. stdio drivers

Scott Lystig Fritchie <>
Fri Jan 3 02:00:14 CET 2003

>>>>> "jh" == James Hague <> writes:

jh> From a purist's point of view using pipes is cleaner.  So here's my
jh> question: How significant is the speed difference between the two
jh> methods under Windows?  "Twice as fast" makes no difference if
jh> we're talking microseconds, but I suspect that because a pipe
jh> involves several task switches the minimum time for a call and
jh> response is going to be 20 milliseconds or so.  Has anyone done
jh> any timings?

I once did this for Linux, FreeBSD, and Solaris x86 on the same
hardware, but I can't find the data.  So I cooked up a very small test
for FreeBSD, since that's the machine I've got handy right this

The call in and out has a minimal amount of data going in each
direction (er, about 5 bytes in and 6? bytes out ... with an extra 2
or 3? bytes in each direction for the pipe driver).  This was done on
a Pentium III laptop at 500MHz running FreeBSD 4.7-RELEASE.

"linked-in" style (via shared lib): 9.7 microseconds/call (103500 calls/second)
"pipe" style                      : 192 microseconds/call (5190 calls/second)

Watching the stats from "vmstat" while the "pipe" style driver was
running, I see anywhere from 53-97K system calls per second and
8.2-15.0K context switches per second.  For both driver styles, there
was 0% idle time.


More information about the erlang-questions mailing list