symjit 2.25.5

a lightweight just-in-time (JIT) optimizer compiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::Result;
use symjit::Compiler;

/*
 * For profiling using Samply,
 * 1. Build as cargo build --profile profiling --bin profiler
 * 2. Profile as samply record ./target/profiling/profiler
 */
pub fn main() -> Result<()> {
    let model = std::fs::read_to_string("3loop_instructions_2.txt")?;
    for _ in 0..10 {
        let mut compiler = Compiler::new();
        compiler.translate(model.clone(), 0)?;
    }
    println!("compiled ok!");
    Ok(())
}