Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mcclowes
Copy link
Owner

Key optimizations:

  • Add getKind() helper for O(1) type checking, replacing repeated
    4-condition pattern (val !== null && typeof val === "object" && ...)
  • Add LeaKind type union for type-safe kind checking
  • Lazy initialize Environment.reactivesBySource to avoid Map allocation
    overhead for non-reactive code
  • Refactor stringify/coerceToString/getLeaType to use switch statements
    for faster dispatch
  • Optimize asFunction to use getKind and for-loop over forEach
  • Update builtins (fst, snd, variance, stdDev) to use getKind
  • Replace spread operators with slice() for array copy (concat, reverse,
    shuffle, sort)
  • Combine loops in variance/stdDev for better performance
  • Add benchmark suite for performance testing (npm run benchmark)

Key optimizations:
- Add getKind() helper for O(1) type checking, replacing repeated
  4-condition pattern (val !== null && typeof val === "object" && ...)
- Add LeaKind type union for type-safe kind checking
- Lazy initialize Environment.reactivesBySource to avoid Map allocation
  overhead for non-reactive code
- Refactor stringify/coerceToString/getLeaType to use switch statements
  for faster dispatch
- Optimize asFunction to use getKind and for-loop over forEach
- Update builtins (fst, snd, variance, stdDev) to use getKind
- Replace spread operators with slice() for array copy (concat, reverse,
  shuffle, sort)
- Combine loops in variance/stdDev for better performance
- Add benchmark suite for performance testing (npm run benchmark)
@vercel
Copy link

vercel bot commented Dec 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
lea Ready Ready Preview, Comment Dec 21, 2025 0:27am

@mcclowes mcclowes merged commit 8a090a7 into main Dec 21, 2025
5 of 6 checks passed
@mcclowes mcclowes deleted the claude/optimize-lea-vz28m branch December 21, 2025 00:27
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.

3 participants