Skip to content

Conversation

edubart
Copy link
Collaborator

@edubart edubart commented Jan 31, 2025

WIP. This is a experiment on #308 .

This PR stops propagating mcycle everywhere in the interpreter and allows to make a more efficient interpreter hot loop, saving 1 instruction in the Fetch+Decode+Execute (down from 12 to 11 x86_64 instructions for the FENCE instruction trace). My preliminary benchmarks says this improves about ~4% the emulator performance in fibonacci benchmark (will benchmark more later).

It also introduces a new mtime CSR, declopping machine time from machine cycle, so the machine can effectively jump its wall clock. For instance this is used during WFI instructions, so now waiting many cycles in interactive mode does not increment mcycle anymore.

@edubart edubart added the enhancement New feature or request label Jan 31, 2025
@edubart edubart added this to the v0.20.0 milestone Jan 31, 2025
@edubart edubart self-assigned this Jan 31, 2025
@edubart edubart changed the base branch from main to refactor/new-readme January 31, 2025 19:25
@edubart edubart linked an issue Jan 31, 2025 that may be closed by this pull request
@edubart edubart force-pushed the feature/mtime branch 3 times, most recently from cbe4dd4 to 6fd787c Compare February 2, 2025 21:11
@edubart edubart force-pushed the refactor/new-readme branch from 8b2f26c to 8dfa54a Compare March 25, 2025 19:28
Base automatically changed from refactor/new-readme to main March 26, 2025 10:04
@edubart edubart moved this from In Progress to On Hold in Machine Unit Apr 9, 2025
@edubart edubart removed this from the v0.20.0 milestone Apr 9, 2025
@edubart edubart added this to the v0.20.0 milestone May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: On Hold

Development

Successfully merging this pull request may close these issues.

Opportunity to save 1 instruction from mcycle checks

1 participant