Skip to content

Add caching of remove underscore result #545

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

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

snuyanzin
Copy link
Collaborator

Also brings some speed improvements for cases of methods invocations via expressions e.g.
before

Benchmark                                      Mode  Cnt     Score    Error   Units
DatafakerExpressions.numberbetweenExpression  thrpt   10  2806.942 ± 52.094  ops/ms

after

Benchmark                                      Mode  Cnt     Score     Error   Units
DatafakerExpressions.numberbetweenExpression  thrpt   10  3333.331 ± 246.507  ops/ms

test itself

    @Benchmark
    @BenchmarkMode(Mode.Throughput)
    public void numberbetweenExpression(Blackhole blackhole) {
        blackhole.consume(DATA_FAKER.expression("#{number.number_between '1','10'}"));
    }

@snuyanzin snuyanzin merged commit a5eaa17 into datafaker-net:main Nov 10, 2022
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