[erlang-questions] Port drivers vs nifs

Lukas Larsson lukas@REDACTED
Wed Mar 20 10:51:49 CET 2019


On Wed, Mar 20, 2019 at 9:22 AM Albin Stigö <albin.stigo@REDACTED> wrote:

> Hi,
>
> How does Nifs compare to Port drivers in OTP 21 and beyond..? It used to
> be that port drivers were more suited for threaded c libraries etc, but it
> seems to me now you can do anything with with either.
>
> Will port drivers be deprecated?
>

No.


>
> Which should I choose when starting a new hardware driver (assuming I have
> ruled out ports and c nodes, I'm aware of the implications)?
>

I would do it in a NIF. NIFs have a larger API, work on dirty schedulers
and are in most cases more performant than port drivers.


>
>
> --Albin
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190320/67a44f5f/attachment.htm>


More information about the erlang-questions mailing list