Skip to content

Conversation

@kareltucek
Copy link
Collaborator

@kareltucek kareltucek commented Jan 29, 2026

Summary

  • Replace processCommand() switch-case parsing with gperf-generated O(1) hash lookup
  • Add command_ids.h enum with all macro command IDs
  • Add command_hash.gperf input file for hash table generation
  • Add CMake integration to regenerate command_hash.c when gperf input changes

Test plan

  • Builds successfully with ./build.sh right make
  • Verify macro commands work correctly on device

🤖 Generated with Claude Code

@kareltucek
Copy link
Collaborator Author

Benchmarks:

  • 15.0.x uhk80 with -Os: 3140ms
    -16.1.1:
    • uhk80 with -Os 4057ms (+30%, supposedly due to macro arguments? That's suspiciously high)
    • uhk80 with -Os and gperf 2677ms
    • uhk80 with -O2 and gperf 2050ms

kareltucek and others added 4 commits January 29, 2026 20:49
Replace the processCommand() switch-case parsing with gperf-generated
O(1) hash lookup. Adds command_ids.h enum, command_hash.gperf input,
and CMake integration to regenerate command_hash.c when needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kareltucek kareltucek force-pushed the feature/gperf-command-parser branch from d72d6e1 to 298e2be Compare January 29, 2026 20:00
@kareltucek kareltucek merged commit 7ffb721 into master Jan 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants