ExWeb3 / ex_keccak

Elixir library for computing Keccak SHA3-256 hashes using a NIF built tiny-keccak Rust crate.
Apache License 2.0
25 stars 20 forks source link

DirtyCpu Schedule? #28

Closed heri16 closed 1 year ago

heri16 commented 1 year ago

Should we add? #[rustler::nif(schedule = "DirtyCpu")]

ayrat555 commented 1 year ago

@heri16 are you sure it's really needed? I don't think the operation take a lot of time

from rustler docs:

For functions that may take some time to return - let's say more than 1 millisecond - it is
/// recommended to use the `schedule` flag. This tells the BEAM to allocate that NIF call
/// to a special scheduler. These special schedulers are called "dirty" schedulers.
tzumby commented 1 year ago

Agreed with @ayrat555, all the operations here are super fast