Skip to content

Conversation

riqts
Copy link

@riqts riqts commented Sep 20, 2025

Enhanced Immutability Benchmarks

Extends the benchmark suite.

New Features:

  • State reuse testing: Tests performance on frozen/evolved states
  • Array position comparison: Low vs high index operations
  • Multiple updates: Batch update scenarios
  • Mixed operation sequences: Realistic workflow testing

Addresses:

  • Performance on frozen states
  • Array index position effects on performance
  • Multiple operations in sequence scenarios

This extends from a convo I had with @markerikson on discord:

the perf-testing/immutability-benchmarks.mjs script could probably use a few more variations:

  • right now it's just doing each action 10 times with the initial state. Having an option to keep reusing the updated state to compare update perf on a frozen state would be good
  • could use some more complex scenarios, like multiple updates in a row
  • also in an earlier iteration of the benchmark someone pointed out doing array updates to low indices means it's faster, vs doing something like index 5000 out of 10000, so maybe tweaking that again

Currently runs everything. Easy to add more control to run limited only certain scenarios though

…. Added state reuse, batch, and multi-operation benchmarking scenarios.
…arking setup with updated action handling and focus on core and position-specific operations.
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.

1 participant