Skip to content

Conversation

@ryanwilsond
Copy link
Owner

@ryanwilsond ryanwilsond commented Jun 21, 2025

Description

Very simple profiler to compare the efficiency of the Evaluator, Interpreter, and Executor.

Findings so far:

  • Interpreter is always the slowest
  • Executor beats Evaluator unless the input is very short and linear

Next research:

  • Wider variety of tests (arrays, higher heap stress, etc.)
  • (Stretch) use each test and calculate node frequency scores compounded by test time to over time create a heuristic for expensive vs cheap nodes to potentially use in a deferring algorithm for using the Evaluator over Executor

The AutoRun build mode will now always default to Executor (assuming bug-free)
Can later add some logic to redirect to the Evaluator if the program is tiny and dynamic loop-free (could statically check loops and still defer to Evaluator if they are known to be small in scope)

Also fixed a lot of bugs with the CodeGenerator, especially around arrays.

@ryanwilsond ryanwilsond self-assigned this Jun 21, 2025
@ryanwilsond ryanwilsond merged commit 1ff6d42 into rw/evalopt Jun 22, 2025
1 check passed
@ryanwilsond ryanwilsond deleted the rw/profiler branch June 22, 2025 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants