This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[build] | |
target = "s390x-unknown-linux-gnu" | |
[target.s390x-unknown-linux-gnu] | |
# runner = "qemu-s390x -cpu max -L /usr/s390x-linux-gnu" | |
runner = "qemu-s390x -cpu qemu,vx=on,vxeh=on,vxeh2=off -L /usr/s390x-linux-gnu" | |
# runner = "qemu-s390x -cpu z10EC -L /usr/s390x-linux-gnu" | |
linker = "s390x-linux-gnu-gcc" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```rust | |
pub fn main() { | |
for _ in 0..100000 { | |
for email in INPUT { | |
let result = autolink_email(core::hint::black_box(email.as_bytes())); | |
} | |
} | |
} | |
const INPUT: &[&str] = &[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const N: usize = 10000; | |
fn main() { | |
let mut args = std::env::args().skip(1); // skip the program name | |
// just get a bunch of arbitrary values cheaply | |
const INPUT: &[u8] = include_bytes!( | |
"/home/folkertdev/.cargo/registry/cache/github.com-1ecc6299db9ec823/clap-4.2.7.crate" | |
); | |
let (_, table, _) = unsafe { INPUT.align_to() }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[unsafe(naked)] | |
extern "C" fn Reset() { | |
core::arch::naked_asm!( | |
// debug info | |
".cfi_sections .debug_frame", | |
".cfi_startproc", | |
// If enabled, initialise the SP. This is normally initialised by the CPU itself or by a | |
// bootloader, but some debuggers fail to set it when resetting the target, leading to | |
// stack corruptions. | |
#[cfg(feature = "set-sp")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "compare256-benchmark" | |
version = "0.1.0" | |
edition = "2024" | |
[dev-dependencies] | |
divan = "0.1.21" | |
[[bench]] | |
name = "compare256" |
OlderNewer