Skip to content

Commit

Permalink
wordsmithing
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkern committed Sep 11, 2024
1 parent 0242426 commit 7fcd8c6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions book/src/unsafe.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ undefined behavior. Additionally, code generated by the macro will not use the
unsafe keyword, so generated code may be used in a crates using the
`#![forbid(unsafe_code)]` attribute.

Disabling unsafe code will generally result in a slower parser overall, though rarely
may end up slightly faster.
Generally, disabling unsafe code will result in a slower parser.

There are too many variables to consider between compiler optimizations, the specific
grammar being parsed, and the target processor to make definitive statements about
performance of safe-only code. The automated benchmarks of this crate shows around a
10% slowdown in safe-only code as of the time of this writing.
However making definitive statements around performance of safe-only code is difficult,
as there are too many variables to consider between compiler optimizations,
the specific grammar being parsed, and the target processor. The automated benchmarks
of this crate show around a 10% slowdown in safe-only code at the time of this writing.

0 comments on commit 7fcd8c6

Please sign in to comment.