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

Do not analyze + interpret constant maps, sets and vectors #452

Closed
borkdude opened this issue Nov 25, 2020 · 0 comments
Closed

Do not analyze + interpret constant maps, sets and vectors #452

borkdude opened this issue Nov 25, 2020 · 0 comments

Comments

@borkdude
Copy link
Collaborator

borkdude commented Nov 25, 2020

Currently we analyze and interpret constant maps like {:a 1 :b 2}. We can skip that by checking if all the keys and values are constants. We should be careful about metadata because sometimes metadata does contains something which needs evaluation:

user=> (meta ^{:a (+ 1 2 3)} {:a 1})
{:a 6}

See test script: scripts/optimizations/GH-452-constant-colls

borkdude added a commit that referenced this issue Nov 25, 2020
borkdude added a commit to babashka/babashka that referenced this issue Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant