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

[DRAFT] Serializers cache #2004

Closed
wants to merge 2 commits into from
Closed

[DRAFT] Serializers cache #2004

wants to merge 2 commits into from

Conversation

qwwdfsad
Copy link
Member

@qwwdfsad qwwdfsad commented Aug 2, 2022

Attempt to somehow address #2003

@qwwdfsad
Copy link
Member Author

qwwdfsad commented Aug 2, 2022

Preliminary data

Benchmark                                Mode  Cnt   Score   Error   Units
LookupOverheadBenchmark.dataPlain       thrpt   14   9.831 ± 0.457  ops/us
LookupOverheadBenchmark.dataReified     thrpt   14   3.326 ± 0.084  ops/us
LookupOverheadBenchmark.genericPlain    thrpt   14   5.473 ± 0.565  ops/us
LookupOverheadBenchmark.genericReified  thrpt   14   0.164 ± 0.008  ops/us
LookupOverheadBenchmark.objectPlain     thrpt   14  27.828 ± 2.141  ops/us
LookupOverheadBenchmark.objectReified   thrpt   14   5.221 ± 0.101  ops/us

@qwwdfsad
Copy link
Member Author

qwwdfsad commented Aug 2, 2022

The following best-case approximation of caching:

@Benchmark                                                             
fun objectApprox(): Object {                                           
    typeOf<Object>()                                                   
    return Json.decodeFromString(Object.serializer(), "{}")            
}                                                                      

gives

LookupOverheadBenchmark.objectApprox  thrpt   14  13.181 ± 0.821  ops/us

which is much better for the benchmark that stresses empty string

@qwwdfsad
Copy link
Member Author

Continuing in #2003

@LouisCAD
Copy link
Contributor

Continuing a PR in an issue that predates it? Are you sure you referenced the right one?

@qwwdfsad
Copy link
Member Author

Oh, right, I've meant #2015 :)

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