I want to convert an array of 8 bytes (new byte[8]
) to a long
. I've found many solutions but which one is the fastest? I'm not sure how I can benchmark these solutions.
Here are a couple of solutions that look good to me:
- https://stackoverflow.com/a/60456641/5647659
- https://stackoverflow.com/a/29132118/5647659
- https://stackoverflow.com/a/27610608/5647659
Or maybe you have an even better solution?
Note: I don't need to convert them back to an array of bytes