[erlang-questions] Port drivers vs nifs

Albin Stigö albin.stigo@REDACTED
Wed Mar 20 11:30:49 CET 2019


Thanks! The documentation should maybe be updated to reflect this... or
maybe I just missed it.

On Wed, Mar 20, 2019, 10:52 Lukas Larsson <lukas@REDACTED> wrote:

>
>
> 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/09a6493b/attachment.htm>


More information about the erlang-questions mailing list