Remove BP optimization.

This commit is contained in:
Stephen Chung 2023-03-18 09:50:50 +08:00
parent 29d6cdcc39
commit 7caf80e27c
3 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,12 @@
Rhai Release Notes
==================
Version 1.14.0
==============
The code hacks that attempt to optimize branch prediction performance are removed because benchmarks do not show any material speed improvements.
Version 1.13.0
==============

View File

@ -431,6 +431,7 @@ impl Engine {
#[cfg(not(feature = "no_object"))]
Expr::Dot(..) => self.eval_dot_index_chain(global, caches, scope, this_ptr, expr, None),
#[allow(unreachable_patterns)]
_ => unreachable!("expression cannot be evaluated: {:?}", expr),
}
}

View File

@ -946,6 +946,7 @@ impl Engine {
Ok(Dynamic::UNIT)
}
#[allow(unreachable_patterns)]
_ => unreachable!("statement cannot be evaluated: {:?}", stmt),
}
}