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

perf: direct access to serialize method #751

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cesco69
Copy link
Contributor

@cesco69 cesco69 commented Dec 11, 2024

Direct access to serialize method (eg.: asString(key)) instead of access to object/method (eg.: serializer.asString(key))

PR

short string............................................. x 26,715,109 ops/sec ±1.66% (186 runs sampled)
unsafe short string...................................... x 144,926,182 ops/sec ±2.70% (178 runs sampled)
short string with double quote........................... x 14,302,995 ops/sec ±0.71% (187 runs sampled)
long string without double quotes........................ x 13,117 ops/sec ±0.44% (192 runs sampled)
unsafe long string without double quotes................. x 136,037,346 ops/sec ±3.21% (174 runs sampled)
long string.............................................. x 12,649 ops/sec ±0.53% (189 runs sampled)
unsafe long string....................................... x 140,424,165 ops/sec ±3.30% (173 runs sampled)
number................................................... x 141,936,485 ops/sec ±2.62% (176 runs sampled)
integer.................................................. x 116,027,589 ops/sec ±2.30% (181 runs sampled)
formatted date-time...................................... x 1,208,504 ops/sec ±0.54% (189 runs sampled)
formatted date........................................... x 1,004,965 ops/sec ±0.44% (190 runs sampled)
formatted time........................................... x 1,011,317 ops/sec ±0.49% (192 runs sampled)
short array of numbers................................... x 64,741 ops/sec ±0.73% (183 runs sampled)
short array of integers.................................. x 59,744 ops/sec ±0.64% (185 runs sampled)
short array of long strings.............................. x 19,351 ops/sec ±0.46% (190 runs sampled)

MASTER

short string............................................. x 26,372,524 ops/sec ±1.51% (187 runs sampled)
unsafe short string...................................... x 135,783,091 ops/sec ±3.67% (176 runs sampled)
short string with double quote........................... x 14,744,744 ops/sec ±0.61% (190 runs sampled)
long string without double quotes........................ x 13,022 ops/sec ±0.52% (191 runs sampled)
unsafe long string without double quotes................. x 141,731,330 ops/sec ±3.09% (173 runs sampled)
long string.............................................. x 13,091 ops/sec ±0.43% (192 runs sampled)
unsafe long string....................................... x 140,741,175 ops/sec ±3.24% (175 runs sampled)
number................................................... x 139,034,507 ops/sec ±3.69% (172 runs sampled)
integer.................................................. x 129,740,924 ops/sec ±3.11% (179 runs sampled)
formatted date-time...................................... x 1,226,870 ops/sec ±0.51% (192 runs sampled)
formatted date........................................... x 1,009,991 ops/sec ±0.50% (190 runs sampled)
formatted time........................................... x 1,023,148 ops/sec ±0.41% (191 runs sampled)
short array of numbers................................... x 71,547 ops/sec ±0.53% (189 runs sampled)
short array of integers.................................. x 69,933 ops/sec ±0.57% (191 runs sampled)
short array of short strings............................. x 19,665 ops/sec ±0.43% (190 runs sampled)
short array of long strings.............................. x 19,480 ops/sec ±0.52% (190 runs sampled)

@cesco69 cesco69 marked this pull request as draft December 11, 2024 10:48
@cesco69 cesco69 marked this pull request as ready for review December 11, 2024 10:55
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