chore: add startup benchmark script#30
Open
sacchen wants to merge 1 commit into
Open
Conversation
Measures warm p50/p95 over 12 runs for four representative invocations. Use before/after any startup optimization to capture baselines. Closes #21 investigation phase. See issue for profiling findings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/bench.shto measure warm startup latency (p50/p95 over 12 runs):version,2+2,d(x^2,x),solve(x^2-4,x)Current baseline (this machine)
Findings from profiling (see issue #21 comment)
The dominant cost is
sympy.polys(~118ms of SymPy's ~245ms total), loaded becausesolveneeds polynomial algorithms. Theurllib.requestclaim in the issue is not meaningful — its import is <0.1ms and the network call is already guarded byisatty().Realistic floor with current feature set: ~200ms. The <150ms target in #21 is not achievable without removing
solvefrom the namespace.Closes #21 investigation phase.