Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

separate out benchmark into 4 stages: create, serialize, deserialize, hash #154

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

jakemac53
Copy link
Contributor

As mentioned in #153. This gives us a better overall picture of where time is going, in the various modes.

Current results:

        SdkMapsJsonWireBenchmark-create:  904ms
      SdkMapsBufferWireBenchmark-create:  711ms
     SdkMapsBuilderWireBenchmark-create:  713ms
       LazyMapsJsonWireBenchmark-create:    0ms
     LazyMapsBufferWireBenchmark-create:    0ms
 LazyWrappersBufferWireBenchmark-create:  420ms
    BuilderMapsJsonWireBenchmark-create:  374ms
 BuilderMapsBuilderWireBenchmark-create:  379ms
        SdkMapsJsonWireBenchmark-serialize:  746ms, 7177227 bytes
      SdkMapsBufferWireBenchmark-serialize:  633ms, 5122684 bytes
     SdkMapsBuilderWireBenchmark-serialize:  667ms, 4859868 bytes
       LazyMapsJsonWireBenchmark-serialize: 1104ms, 7177227 bytes
     LazyMapsBufferWireBenchmark-serialize:  543ms, 5122684 bytes
 LazyWrappersBufferWireBenchmark-serialize:    0ms, 2111761 bytes
    BuilderMapsJsonWireBenchmark-serialize: 1028ms, 7177227 bytes
 BuilderMapsBuilderWireBenchmark-serialize:    0ms, 2111761 bytes
        SdkMapsJsonWireBenchmark-deserialize: 1249ms
      SdkMapsBufferWireBenchmark-deserialize:    0ms
     SdkMapsBuilderWireBenchmark-deserialize:    0ms
       LazyMapsJsonWireBenchmark-deserialize: 1298ms
     LazyMapsBufferWireBenchmark-deserialize:    0ms
 LazyWrappersBufferWireBenchmark-deserialize:    0ms
    BuilderMapsJsonWireBenchmark-deserialize: 1257ms
 BuilderMapsBuilderWireBenchmark-deserialize:    0ms
        SdkMapsJsonWireBenchmark-process:  151ms, hash 23186292
      SdkMapsBufferWireBenchmark-process:  249ms, hash 23186292
     SdkMapsBuilderWireBenchmark-process:  541ms, hash 23186292
       LazyMapsJsonWireBenchmark-process:  179ms, hash 23186292
     LazyMapsBufferWireBenchmark-process:  251ms, hash 23186292
 LazyWrappersBufferWireBenchmark-process:  367ms, hash 23186292
    BuilderMapsJsonWireBenchmark-process:  207ms, hash 23186292
 BuilderMapsBuilderWireBenchmark-process:  364ms, hash 23186292
        SdkMapsJsonWireBenchmark-total: 3050ms
      SdkMapsBufferWireBenchmark-total: 1593ms
     SdkMapsBuilderWireBenchmark-total: 1921ms
       LazyMapsJsonWireBenchmark-total: 2581ms
     LazyMapsBufferWireBenchmark-total:  794ms
 LazyWrappersBufferWireBenchmark-total:  787ms
    BuilderMapsJsonWireBenchmark-total: 2866ms
 BuilderMapsBuilderWireBenchmark-total:  743ms

@jakemac53 jakemac53 requested a review from davidmorgan December 9, 2024 21:42
Copy link
Contributor

@davidmorgan davidmorgan left a comment

Choose a reason for hiding this comment

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

Nice, thanks :)

@jakemac53
Copy link
Contributor Author

jakemac53 commented Dec 11, 2024

I merged this with master - note that now the deserialization shows as being incredibly slow for regular classes deserializing from JsonBuffers which is interesting (it wasn't measured at all previously!). Investigating this would be some additional work, clearly something pathological is happening.

@jakemac53
Copy link
Contributor Author

Actually, the slowness looks identical to what happens if you do the hashing benchmark by iterating the keys and looking them up - which is how I implemented the deserialization. So, it makes perfect sense.

@davidmorgan
Copy link
Contributor

Sorry, I intended to approve with the review ... apparently I still fail at GitHub.

@jakemac53 jakemac53 merged commit 4c4adc1 into main Dec 13, 2024
51 checks passed
@jakemac53 jakemac53 deleted the staged-benchmark branch December 13, 2024 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants