mirror of
https://github.com/Noratrieb/brainfuck.git
synced 2026-01-16 14:25:03 +01:00
testing
This commit is contained in:
parent
4c1799c19d
commit
84a0f13244
2 changed files with 164 additions and 17 deletions
|
|
@ -18,13 +18,8 @@ fn main() {
|
|||
fn run(path: String) {
|
||||
println!("Path: {}", path);
|
||||
let program = fs::read_to_string(path).unwrap();
|
||||
let program = minify(program);
|
||||
println!("{}", program);
|
||||
|
||||
let start = SystemTime::now();
|
||||
|
||||
let out = o1::run(&*program);
|
||||
|
||||
println!("{}\nFinished execution in {}ms", out, start.elapsed().unwrap().as_millis());
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +30,7 @@ fn run(path: String) {
|
|||
/// most importantly: loop jumps should be immediate
|
||||
///
|
||||
mod o1 {
|
||||
use std::io::{stdin, Read};
|
||||
use std::io::{stdin, Read, stdout, Write};
|
||||
|
||||
const MEM_SIZE: usize = 0xFFFF;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue