Skip to content

Use batch API to create Ruby arrays#280

Merged
byroot merged 1 commit intotrilogy-libraries:mainfrom
byroot:result-init
Mar 28, 2026
Merged

Use batch API to create Ruby arrays#280
byroot merged 1 commit intotrilogy-libraries:mainfrom
byroot:result-init

Conversation

@byroot
Copy link
Copy Markdown
Collaborator

@byroot byroot commented Mar 27, 2026

Every call to rb_ary_push keep doing the same sanity checks again and again (is it frozen, does it have capacity left, etc etc), which is wasteful. It's best to keep values in a scratch spaces and create arrays all at once.

@byroot byroot merged commit a5ef4ed into trilogy-libraries:main Mar 28, 2026
39 checks passed
@byroot byroot deleted the result-init branch March 28, 2026 06:57
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.

1 participant