> You might not have read about dirty schedulers[1] which seem to be a > stable > API now, & here's a few links from Steve Vinoski related to NIF handling > [2][3] > and some sample code [4] from Steve and from JLouis [5] using them.
Thanks for these links! I think I read something about dirty schedulers, but didn't realize there where already marked as stable. However, taken apart the scheduling issue you always have to be worried about your C code crashing and bringing the Erlang VM down. My feeling is that it's ok to use a NIF with a battle-proven and specialized library here and there to speed things up. On the other side, bringing in a whole JavaScript runtime might be slight overkill. > We already have some couchdb NIF code, and if there's a performance gain > it > would be great to ship some more. In case somebody feels adventurous and wants to play with it, I just pushed the Erlang bindings to ChakraCore I worked on before I started with couch-chakra. It's not as polished as couch-chakra, however the existing code should be fully functional. https://github.com/dmunch/erlchakra Have fun and a+, Daniel > A+ > Dave > > [1]: > https://medium.com/@jlouis666/erlang-dirty-scheduler-overhead-6e1219dcc7#.jgdyewal6 > [2]: https://www.youtube.com/watch?v=nw2eIB6bTxY > [3]: > https://github.com/vinoski/bitwise/blob/master/vinoski-schedulers.pdf > [4]: https://github.com/vinoski/bitwise > [5]: https://github.com/jlouis/enacl