Skip to content

Revisit VarInt Performance #596

@jasperpotts

Description

@jasperpotts

The performance of parsing and writing varInts has a decent size effect on Hiero Consensus Node performance as we do so much of it. We put some effort into this area in PBJ and there is com.hedera.pbj.integration.jmh.VarIntBench bench mark where we tried multiple approaches. I found some new articles and examples where great developers competed for best approach. We should test their findings and see what we can learn in PBJ and what performance boost we can see.

We should also update the VarIntBench to test at different input lengths as some algorithms are better for small one byte encoded values while others are better at large input values. As one of the primary uses cases for varint encoding is protobuf tags and the majority of them are 1 byte we should make sure what ever solution is chosen is good for one byte while still being fast for larger values.

Reading List for Ideas:

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions