<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 8, 2016 at 2:11 AM, Matthew Evans <span dir="ltr"><<a href="mailto:mattevans123@hotmail.com" target="_blank">mattevans123@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The NIF code was getting a bit flakey so we made the call to implement it as a CNODE instead to avoid the NIF taking down the VM if it crashed.</blockquote></div><br></div><div class="gmail_extra">I recently wrote a wrapper for OCaml so I could start a port program and ferry operations to that. If you pipelined requests (not waiting for an answer before sending the next request), the overhead amortized to roughly 1us. I could carry out about one million reqs/s utilizing a scheduler core in Erlang and around 0.68 core in OCaml.<br><br></div><div class="gmail_extra">At this point, I decided it was fast enough for most of the work I'd normally send to a foreign process for external work. If a request completed over there in, say, 3ms, then the 1us overhead is small enough that I wouldn't worry.<br><br></div><div class="gmail_extra">Requests waiting synchronously for an answer were about 30.000 reqs/s.<br></div><div class="gmail_extra"><br clear="all"><br>-- <br><div class="gmail_signature">J.</div>
</div></div>