SeRoSystems / lib1090

Java decoding library for Mode S, ADS-B, TIS-B and ADS-R
GNU General Public License v3.0
16 stars 2 forks source link

Performance improvement: int to hex conversion #19

Closed f-loris closed 9 months ago

f-loris commented 9 months ago

After testing and benchmarking lib1090 for our use case we found that some performance is lost when creating the hex representation frequently. Replacing String.format with this method provided a notable performance improvement.

Our jmh benchmarks show that this method is around 8 times faster than String.format .

fixje commented 9 months ago

Looks good. Thanks a lot for the contribution!