This experiment measures the time spent in JIT-compiled code versus the interpreter.
JIT Time = duration_jit_executing
Interpreter Time = wall_clock - jit_executing - trace_mapping - deopting
| $ multitime -n 10 -s 1 ~/yklua/src/lua ./harness.lua Queens 10 1000 | |
| Starting Queens benchmark ... | |
| Queens: iterations=1 runtime: 494681us | |
| Queens: iterations=1 runtime: 457936us | |
| Queens: iterations=1 runtime: 461543us | |
| Queens: iterations=1 runtime: 458264us | |
| Queens: iterations=1 runtime: 457801us | |
| Queens: iterations=1 runtime: 457150us | |
| Queens: iterations=1 runtime: 458036us | |
| Queens: iterations=1 runtime: 460640us |
| #!/home/pd/.pyenv/versions/3.10.13/bin/rebench -c --no-denoise rebench.conf | |
| # Execution Start: 2025-10-10T19:24:40.241431+00:00 | |
| # Environment: {"userName":"pd","manualRun":true,"hostName":"bencher16","osType":"Linux","memory":371411361792,"denoise":{},"cpu":"Intel(R) Xeon(R) Platinum 8452Y","clockSpeed":800000000,"software":[{"name":"kernel","version":"#1 SMP PREEMPT_DYNAMIC Debian 6.12.41-1 (2025-08-12)"},{"name":"kernel-release","version":"6.12.41+deb13-amd64"},{"name":"architecture","version":"x86_64"}]} | |
| # Source: {"repoURL":"git@github.com:ykjit/yk-benchmarks.git","branchOrTag":"main","commitId":"d443005a2188aaea3ab9b20de6eb2f380f01ce67","commitMsg":"Merge pull request #32 from vext01/commits\n\nAdd commit hashes to plots, make plots wider\n","authorName":"Laurence Tratt","committerName":"GitHub","authorEmail":"laurie@tratt.net","committerEmail":"noreply@github.com"} | |
| invocation iteration value unit criterion benchmark executor suite extraArgs cores inputSize varValue tag machine runId | |
| # benchmark: 0={"nam |
| #!/bin/bash | |
| export YKD_SERIALISE_COMPILATION=1 | |
| export RUST_BACKTRACE=full | |
| # Get the test file from shrinkray (it passes it as an argument) | |
| TEST_FILE="$1" | |
| if [ -z "$TEST_FILE" ]; then | |
| echo "Error: No test file provided" | |
| exit 1 |
| #!/bin/bash | |
| # Usage: shrinkray --timeout 10 --parallelism 50 --no-clang-delta shrinkray_interest.sh ./cstack.minimal.lua | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: $0 <input.lua>" | |
| exit 1 | |
| fi | |
| INPUT="$1" | |
| LUA_EXEC="$SCRIPT_DIR/../src/lua" |
| # pip install pygame | |
| ```python | |
| import pygame | |
| def play_mp3(file_path): | |
| pygame.mixer.init() | |
| pygame.mixer.music.load(file_path) | |
| pygame.mixer.music.play() |
| import os | |
| import requests | |
| from take_home_test_starter.config import Config | |
| BASE_URL = "https://s3-eu-west-1.amazonaws.com/vito.landcover.global/v3.0.1/2019/" | |
| LATITUDES = ["S40", "S20", "N00", "N20", "N40", "N60", "N80"] |
| use std::env; | |
| use lrlex::lrlex_mod; | |
| use lrpar::lrpar_mod; | |
| lrlex_mod!("coconut.l"); // brings the lexer for `coconut.l` into scope. | |
| lrpar_mod!("coconut.y"); // brings the Parser for `coconut.y` into scope. | |
| mod ast; | |
| mod instruction; |
| #[derive(Debug)] | |
| pub enum Node { | |
| Add { lhs: Box<Node>, rhs: Box<Node> }, | |
| Mul { lhs: Box<Node>, rhs: Box<Node> }, | |
| Number { value: u64 }, | |
| } |
| #[derive(Debug, PartialEq, Clone)] | |
| pub enum Op { | |
| Add, // Addition operation | |
| Mull, // Multiplication operation | |
| Push { value: u64 }, // Load numeric value onto stack | |
| } |