Skip to content

Commit

Permalink
Add feature to use optimized intrinsics
Browse files Browse the repository at this point in the history
The Rust core library provides unoptimized string copying routines,
which are much slower than the optimized assembly versions provided by
ARM. So wire this up as a cargo feature, and enable it by default.
  • Loading branch information
ardbiesheuvel committed Nov 8, 2023
1 parent 4b72a3d commit d414b13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ spinning_top = "0.2.5"
once_cell = { version = "1.18.0", default-features = false, features = ["alloc"] }
efiloader = "0.0.1"
aarch64-paging = "0.5.0"
aarch64-intrinsics = { version = "1.0.0", optional = true }

[features]
default = ["use_optimized_intrinsics"]
use_optimized_intrinsics = ["dep:aarch64-intrinsics"]

[profile.dev]
panic = "abort"
Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ use log::{debug, error, info};
extern crate alloc;
use alloc::vec::Vec;

#[cfg(feature = "use_optimized_intrinsics")]
extern crate aarch64_intrinsics;

use aarch64_paging::paging::Attributes;

use efiloader::*;
Expand Down

0 comments on commit d414b13

Please sign in to comment.