diff --git a/README.md b/README.md index 66bece5c5e4541d1be7886b9db7be09ed03270b2..d531ea3e86258ac8ee0b600b123598818aaf4db0 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,37 @@ # Process-Based Simulation with Stackless Coroutines ## Overview -This repository contains the source code for the simulator core discussed in our SAM 2020 paper. -In order to run the examples, you should install the [Rust-compiler] first. +This repository contains the source code for the simulator core discussed in our IST 2021 paper. +In order to run the examples and benchmarks, you should install the [Rust-compiler], SLX and a C++ compiler first. +Any C++-14 conforming compiler should work, the ODEMx-library is translated using Rust code that searches for a compiler +first, so the popular compilers `msvc`, `clang`, `mingw` and `gcc` should all work out of the box. -The `src/` directory contains the source code for our simulator core *simcore-rs* as well as the decompressor-tokenizer- -and the barbershop-example from the paper. The folder `benches/` contains the code used for benchmarking the barbershop- -example. In `slx/` one can find the SLX-code for the barbershop-example, including benchmarking provisions. -The `results/` directory contains our benchmarking results for the barbershop-example in Rust and SLX. +Unfortunately, there is way to get SLX at the moment, as the creator James O. Henriksen passed away in 2020, and the +company's original website has vanished. We are unsure if it would be legal for us to provide you with the demo +version in the context of this repository, so we opted against it. Please contact us if you wish to obtain the free +version of SLX for your own benchmarks. -Unfortunately, we are unable to provide a link to the SLX-compiler at this time. Please contact us if you wish to -execute the barbershop-example in SLX as well. +The `src/` directory contains the source code for our simulator core *simcore-rs* as well as the decompressor-tokenizer +example from the paper. The folder `examples/` contains the *Barbershop*, *Car Ferry* and *Dining Philosopher* examples +including the code used for the comparative benchmarks. In `slx/` one can find the SLX-code for the same examples, +also including benchmarking provisions in the form of (real time) measurements. The `cpp/` folder contains three +sub-projects for the three examples that use ODEMx. The `results/` directory contains the complete report for our +benchmarking results. Finally, the `odemx-lite/` folder contains a pure version of ODEMx, that is pure in the sense +that all external dependencies have been stripped, and it only requires a C++-14 conforming compiler to be translated. ## Executing the Sample Code -You may execute the decompressor-tokenizer example using `cargo run --bin coroutines` and the barbershop example -using `cargo run --bin barbershop`. For the benchmarks of the simulator core in case of the barbershop example you may -enter `cargo bench` into your terminal. Cargo will download and compile all the dependencies for you. +You may execute the decompressor-tokenizer example using `cargo run --bin coroutines` and the other examples using +`cargo run --example <name>` for `<name>` in [*barbershop*, *ferry*, *philosophers*]. For the benchmarks enter +`cargo bench` into your terminal (or `cargo bench --example <name>` if you wish to run a specific benchmark). +Cargo will download and compile all the dependencies for you. Should you wish to execute the SLX code as well, you will need to obtain a version of SLX first. The free student -version is sufficient to run the benchmarks with a sample size of 1 for a quick comparison between SLX and Rust, but in -order to get statistically relevant results, you need to own a license for the full version of SLX. +version is sufficient to run the benchmarks but is about 30% slower than the full version of SLX due to its generation +of 32-bit binaries rather than 64-bit binaries like the full version does. ## Benchmarks -We executed the benchmarks under Windows 10 on an Intel Core i7-10750H processor with 6 cores and 32 GB DDR4 RAM. -You can find the results under `results/barbershop.lis` for SLX and `results/barbershop/report/index.html` for Rust. -In a nutshell: we see a speed difference between the SLX- and the Rust-version of the barbershop example of about 3 in -favor of SLX. We have summarized the results in the following table for your convenience: +We executed the benchmarks under Windows 10 on an Intel Core i7-10750H processor with 6 cores (12 with hyper-threading) +and 32 GB DDR4 RAM with activated link-time optimizations and optimization level 3. -| Model Time | SLX Mean | SLX SD | Rust Mean | Rust SD | -|:----------:|---------:|---------:|----------:|---------:| -| 100000 | 0.514 ms | 0.052 ms | 1.446 ms | 0.039 ms | -| 200000 | 1.034 ms | 0.069 ms | 2.882 ms | 0.046 ms | -| 300000 | 1.552 ms | 0.073 ms | 4.389 ms | 0.064 ms | -| 400000 | 2.069 ms | 0.089 ms | 5.754 ms | 0.051 ms | -| 500000 | 2.592 ms | 0.116 ms | 7.188 ms | 0.054 ms | -| 600000 | 3.106 ms | 0.121 ms | 8.904 ms | 0.117 ms | -| 700000 | 3.618 ms | 0.127 ms | 10.232 ms | 0.078 ms | -| 800000 | 4.136 ms | 0.150 ms | 11.587 ms | 0.230 ms | +You can find the results under `results/criterion/report/index.html` for all three simulation systems. [Rust-compiler]: https://rust.sh diff --git a/results/barbershop.lis b/results/barbershop.lis deleted file mode 100644 index 36817e61fa5991f1032fec4c2bfa2d6663e14bb6..0000000000000000000000000000000000000000 --- a/results/barbershop.lis +++ /dev/null @@ -1,13 +0,0 @@ -barbershop.slx: SLX-64 AN206 Lines: 7,086 Errors: 0 Warnings: 0 Lines/Second: 680,384 Peak Memory: 111 MB -Execution begins -[100000] mean 0.514 ms, stddev 0.052 ms, half-width 0.001 ms -[200000] mean 1.034 ms, stddev 0.069 ms, half-width 0.002 ms -[300000] mean 1.552 ms, stddev 0.073 ms, half-width 0.002 ms -[400000] mean 2.069 ms, stddev 0.089 ms, half-width 0.002 ms -[500000] mean 2.592 ms, stddev 0.116 ms, half-width 0.003 ms -[600000] mean 3.106 ms, stddev 0.121 ms, half-width 0.003 ms -[700000] mean 3.618 ms, stddev 0.127 ms, half-width 0.003 ms -[800000] mean 4.136 ms, stddev 0.150 ms, half-width 0.004 ms -Execution complete -Objects created: 44 passive and 1,999,959,827 active Pucks created: 2,000,039,828 Peak Memory: 111 MB Time: 3.10 Minutes - diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index d3ab051e23915939733a8424b28545c664e5940d..0000000000000000000000000000000000000000 --- a/src/main.rs +++ /dev/null @@ -1,12 +0,0 @@ - -fn main() { - let iterations = 11; - let chunk_size = 4; - - let res: Vec<_> = (0..(iterations - 1)/chunk_size) - .map(|_| chunk_size) - .chain(std::iter::once((iterations - 1) % chunk_size + 1)) - .collect(); - - println!("{:?}", res); -}