这是indexloc提供的服务,不要输入任何密码
Skip to content

Optimize map parameters #113

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

Merged
merged 4 commits into from
Jan 7, 2024
Merged

Optimize map parameters #113

merged 4 commits into from
Jan 7, 2024

Conversation

PgBiel
Copy link
Owner

@PgBiel PgBiel commented Jan 7, 2024

Don't run unnecessary for loops to map columns, rows etc. if those parameters weren't specified.
Make sure to disable whitespace changes when viewing the diff.

Seems to save about 10% compilation time (300 ms on unreleased Typst 0.11.0) on the test document.

Also adds some tiny extra checks regarding the length of arrays returned by map-rows and map-cols.

@PgBiel PgBiel added this to the v0.0.8 milestone Jan 7, 2024
@PgBiel PgBiel self-assigned this Jan 7, 2024
@PgBiel PgBiel marked this pull request as ready for review January 7, 2024 18:39
@PgBiel PgBiel added the enhancement New feature or request label Jan 7, 2024
@PgBiel PgBiel merged commit d0f2dde into 0.1.0-dev Jan 7, 2024
@PgBiel PgBiel deleted the optimize-map branch January 7, 2024 18:40
PgBiel added a commit that referenced this pull request Jan 7, 2024
Optimize map parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant