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

refactoring on spreading #236

Merged
merged 12 commits into from
Feb 27, 2024
Merged

refactoring on spreading #236

merged 12 commits into from
Feb 27, 2024

Conversation

tiye
Copy link
Member

@tiye tiye commented Feb 23, 2024

优化了一下 & 语法的 spreading 实现方案, 本机(计算 fibo34)又节省了 100ms

  • 从原先的 Symbol 和 & 判断改成了 Syntax 节点判断, 少了一些字符串对比的开销
    • 包括 & ? ~ ~@ 四个语法做了这样的处理,
  • 引入 &call-spread 语法, 专门用于执行包含 spreading 的参数展开, 不对所有参数做检查

但有个极端情况, 因为 &call-spread 是在 preprocess 阶段自动插入的, defmacro 内部用到时, 可能还未插入, 这个特殊的情况需要手动插入一个 &call-spread 调用.

@tiye tiye requested a review from a team February 23, 2024 16:28
@tiye tiye force-pushed the call-spread branch 2 times, most recently from 6bd688a to 477a3b9 Compare February 23, 2024 18:52
@tiye
Copy link
Member Author

tiye commented Feb 25, 2024

updated custom formatter
image

@tiye
Copy link
Member Author

tiye commented Feb 25, 2024

wow
image

@NoEgAm NoEgAm merged commit 15f302a into main Feb 27, 2024
1 check passed
@NoEgAm NoEgAm deleted the call-spread branch February 27, 2024 05:43
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