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

Double check parameterized and titlelize memory comsumption #75

Open
CristhianMotoche opened this issue Sep 26, 2023 · 0 comments
Open

Comments

@CristhianMotoche
Copy link
Contributor

After running the memory benchmark, it seems parameterized and titlelize allocate too much memory as the input string grows:

Case                                   Allocated  GCs
toUnderscore text-len-100                  4,520    0
toUnderscore text-len-10000                4,520    0
toUnderscore text-len-1000000              4,520    0
toUnderscore all text                      4,520    0
toDashed text-len-100                      4,520    0
toDashed text-len-10000                    4,520    0
toDashed text-len-1000000                  4,520    0
toDashed all text                          4,520    0
toCamelCased False text-len-100            3,208    0
toCamelCased False text-len-10000          3,208    0
toCamelCased False text-len-1000000        3,208    0
toCamelCased False all text                3,208    0
toHumanized False text-len-100             3,208    0
toHumanized False text-len-10000           3,208    0
toHumanized False text-len-1000000         3,208    0
toHumanized False all text                 3,208    0
parameterize text-len-100                 46,992    0
parameterize text-len-10000            1,580,624    0
parameterize text-len-1000000        177,927,792   40
parameterize all text                193,121,136   44
titleize text-len-100                     11,912    0
titleize text-len-10000                1,251,528    0
titleize text-len-1000000            156,788,776   37
titleize all text                    170,481,344   40

We should double check what is happening and try to improve it if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant