Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KCL literals are typed, not JSON values #971

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Nov 1, 2023

WASM still sends the KCL literal values back to the JS side as JSON values. But within WASM, our code tracks KCL literal values as an enum with several different variants.

This slows parser down by 4.5% to 8.5% depending on the benchmark, but IMO it's worth it.

Copy link

vercel bot commented Nov 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Nov 1, 2023 6:05pm

@adamchalmers adamchalmers marked this pull request as ready for review November 1, 2023 18:35
@adamchalmers adamchalmers changed the title Different approach to literal values KCL literals are typed, not JSON values Nov 1, 2023
@adamchalmers adamchalmers merged commit 3d0c5c1 into main Nov 1, 2023
15 checks passed
@adamchalmers adamchalmers deleted the achalmers/literal-value branch November 1, 2023 18:52
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