Skip to content

Make assertions macro#2729

Merged
soutaro merged 4 commits intomasterfrom
rbs-assert
Dec 8, 2025
Merged

Make assertions macro#2729
soutaro merged 4 commits intomasterfrom
rbs-assert

Conversation

@soutaro
Copy link
Copy Markdown
Member

@soutaro soutaro commented Dec 4, 2025

Skipping the assertion function calls improves the performance upto 5%.

$ BUNDLE_GEMFILE=Gemfile bundle exec ruby bin/benchmark-parse.rb --label=rbs_assert_macro core sig stdlib
Benchmarking RBS(4.0.0.dev.4 in Gemfile (rbs_assert_macro)) parsing with 332 files...
✅ 11.691 i/s (±0.000%)
% BUNDLE_GEMFILE=Gemfile bundle exec ruby bin/benchmark-parse.rb --label=baseline core sig stdlib
Benchmarking RBS(4.0.0.dev.4 in Gemfile (baseline)) parsing with 332 files...
✅ 11.176 i/s (±0.000%)

```
../../../../ext/rbs_extension/../../src/util/rbs_allocator.c: In function ‘rbs_allocator_init’:
../../../../ext/rbs_extension/../../src/util/rbs_allocator.c:67:18: warning: old-style function definition [-Wold-style-definition]
   67 | rbs_allocator_t *rbs_allocator_init() {
      |                  ^~~~~~~~~~~~~~~~~~
At top level:
```
@soutaro soutaro added this to the RBS 4.0 milestone Dec 4, 2025
@soutaro soutaro added the to-backport:3.10 PRs to be backported to 3.10 label Dec 4, 2025
@soutaro soutaro enabled auto-merge December 8, 2025 02:39
@soutaro soutaro merged commit d80f8b4 into master Dec 8, 2025
34 of 35 checks passed
@soutaro soutaro deleted the rbs-assert branch December 8, 2025 02:42
soutaro added a commit that referenced this pull request Dec 16, 2025
soutaro added a commit that referenced this pull request Dec 16, 2025
Merge pull request #2729 from ruby/rbs-assert
@soutaro soutaro removed the to-backport:3.10 PRs to be backported to 3.10 label Dec 16, 2025
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