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

Add frozen string literal to production code #217

Merged
merged 2 commits into from
Sep 16, 2023

Conversation

tagliala
Copy link
Member

Allows to slightly reduce memory usage.

In the benchmark sample, there is a reduction from:

Total allocated: 685520 bytes (4936 objects)

to:

Total allocated: 660144 bytes (4502 objects)

@tagliala tagliala force-pushed the chore/enable-frozen-string-literal-in-production branch from 16a98d4 to a889621 Compare September 16, 2023 14:32
Allows to slightly reduce memory usage.

In the benchmark sample, there is a reduction on Ruby 3.2 from:

    Total allocated: 685520 bytes (4936 objects)

to:

    Total allocated: 660144 bytes (4502 objects)
@tagliala tagliala force-pushed the chore/enable-frozen-string-literal-in-production branch from a889621 to 525654b Compare September 16, 2023 14:59
@tagliala tagliala merged commit bde195b into master Sep 16, 2023
30 checks passed
@tagliala tagliala deleted the chore/enable-frozen-string-literal-in-production branch September 16, 2023 15:12
tagliala added a commit that referenced this pull request Sep 17, 2023
Comparison:

Master @ c25a157

```
                                 user     system      total        real
.merge                       0.049643   0.000139   0.049782 (  0.049780)
.first                       0.620854   0.020477   0.641331 (  0.719452)
.last                        0.657637   0.019880   0.677517 (  0.755410)
History.merge                0.056640   0.000203   0.056843 (  0.056840)
History.first                0.746947   0.021832   0.768779 (  0.969067)
History.last                 0.801237   0.021547   0.822784 (  1.022579)
#history.first               0.997884   0.023723   1.021607 (  1.374740)
#history.last                1.078028   0.024214   1.102242 (  1.455553)
```

Master after #217 and #218:

```
                                 user     system      total        real
.merge                       0.049869   0.000134   0.050003 (  0.050000)
.first                       0.562156   0.018678   0.580834 (  0.656834)
.last                        0.604508   0.019646   0.624154 (  0.701138)
History.merge                0.056813   0.000197   0.057010 (  0.057004)
History.first                0.688581   0.021208   0.709789 (  0.908478)
History.last                 0.744874   0.021590   0.766464 (  0.965443)
#history.first               0.938423   0.022830   0.961253 (  1.313174)
#history.last                1.018122   0.023720   1.041842 (  1.393156)
```

[ci skip]
tagliala added a commit that referenced this pull request Sep 17, 2023
Comparison:

Master @ c25a157

```
                                     user     system      total        real
.merge                           0.049952   0.000165   0.050117 (  0.050112)
.first                           0.600933   0.020132   0.621065 (  0.698706)
.last                            0.636561   0.020165   0.656726 (  0.734477)
.as_of.first                     1.060459   0.024000   1.084459 (  1.464073)
History.merge                    0.057726   0.000151   0.057877 (  0.057875)
History.first                    0.720578   0.021867   0.742445 (  0.942331)
History.last                     0.771190   0.021951   0.793141 (  0.992843)
#history.first                   0.980279   0.024484   1.004763 (  1.357108)
#history.last                    1.044069   0.023971   1.068040 (  1.419861)
#as_of                           1.292923   0.026767   1.319690 (  1.704987)
```

Master after #217 and #218:

```
                                     user     system      total        real
.merge                           0.049882   0.000147   0.050029 (  0.050024)
.first                           0.564693   0.019807   0.584500 (  0.662243)
.last                            0.601412   0.019698   0.621110 (  0.698620)
.as_of.first                     1.019722   0.024197   1.043919 (  1.424934)
History.merge                    0.057530   0.000199   0.057729 (  0.057727)
History.first                    0.688982   0.021824   0.710806 (  0.911105)
History.last                     0.741591   0.022015   0.763606 (  0.962749)
#history.first                   0.933041   0.023525   0.956566 (  1.307604)
#history.last                    1.011747   0.023640   1.035387 (  1.386767)
#as_of                           1.262592   0.025238   1.287830 (  1.672108)
```

[ci skip]
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