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

improve perf of asString #632

Merged
merged 1 commit into from
Jul 26, 2023
Merged

improve perf of asString #632

merged 1 commit into from
Jul 26, 2023

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Jul 25, 2023

running only the first 4 benchmarks with maxSamples 100 (or else it takes gazillion years

before:

short string............................................. x 27,631,407 ops/sec ±0.44% (192 runs sampled)
short string with double quote........................... x 8,093,221 ops/sec ±0.59% (191 runs sampled)
long string without double quotes........................ x 26,659 ops/sec ±0.28% (193 runs sampled)
long string.............................................. x 11,697 ops/sec ±0.19% (192 runs sampled)

after:

short string............................................. x 43,111,798 ops/sec ±0.96% (187 runs sampled)
short string with double quote........................... x 13,393,581 ops/sec ±0.39% (191 runs sampled)
long string without double quotes........................ x 26,907 ops/sec ±0.20% (192 runs sampled)
long string.............................................. x 11,751 ops/sec ±0.23% (191 runs sampled)

Actually: Why 42?

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
Copy link
Member

Why 42?

It's a reference to Douglas Adams' “The Hitchhiker's Guide to the Galaxy,” because that number is the answer given by a supercomputer to “the Ultimate Question of Life, the Universe, and Everything.”

@mcollina mcollina merged commit 17bb4c2 into master Jul 26, 2023
17 checks passed
@simoneb simoneb deleted the improve-perf-strings branch March 19, 2024 14:23
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.

2 participants