summaryrefslogtreecommitdiff
path: root/core/lib.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-04-04 06:46:31 -0600
committerGitHub <noreply@github.com>2023-04-04 06:46:31 -0600
commita1764f7690cfdc3e42724fcad29ef954b7e576a4 (patch)
tree1b621ebd7a6ef50687eeb2061740895096136e8a /core/lib.rs
parent2dc20168371e827b86e2ce0d1d7787139fba68f3 (diff)
refactor(core): Improve ergonomics of managing ASCII strings (#18498)
This is a follow-on to the earlier work in reducing string copies, mainly focused on ensuring that ASCII strings are easy to provide to the JS runtime. While we are replacing a 16-byte reference in a number of places with a 24-byte structure (measured via `std::mem::size_of`), the reduction in copies wins out over the additional size of the arguments passed into functions. Benchmarking shows approximately the same if not slightly less wallclock time/instructions retired, but I believe this continues to open up further refactoring opportunities.
Diffstat (limited to 'core/lib.rs')
-rw-r--r--core/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/lib.rs b/core/lib.rs
index e8ca36559..e6088304e 100644
--- a/core/lib.rs
+++ b/core/lib.rs
@@ -5,6 +5,7 @@ mod bindings;
pub mod error;
mod error_codes;
mod extensions;
+mod fast_string;
mod flags;
mod gotham_state;
mod inspector;
@@ -59,6 +60,7 @@ pub use crate::extensions::ExtensionFileSource;
pub use crate::extensions::ExtensionFileSourceCode;
pub use crate::extensions::OpDecl;
pub use crate::extensions::OpMiddlewareFn;
+pub use crate::fast_string::FastString;
pub use crate::flags::v8_set_flags;
pub use crate::inspector::InspectorMsg;
pub use crate::inspector::InspectorMsgKind;