ethereum / hevm

symbolic EVM evaluator
https://hevm.dev
GNU Affero General Public License v3.0
223 stars 45 forks source link

Mark FFI calls as `unsafe` #480

Closed elopez closed 4 months ago

elopez commented 4 months ago

Description

unsafe calls are slightly faster, but come with a few restrictions like not being able to reenter into Haskell code, and not releasing the capability. As we don't reenter, and the native code is short-lived, using unsafe makes more sense.

Echidna built with this change showed a ~1.5% improvement in execution time on 1000000 runs in a test codebase.

References:

Checklist