You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuweni.apache.org by GitBox <gi...@apache.org> on 2020/04/30 16:14:44 UTC

[GitHub] [incubator-tuweni] shemnon opened a new pull request #74: Performance - Faster UInt256/Bytes32 conversions

shemnon opened a new pull request #74:
URL: https://github.com/apache/incubator-tuweni/pull/74


   Hyperledger Besu has identified that converting between Bytes32 and
   UInt256 is a performance bottleneck. In particular the current paths
   force a large number of calls to org.apache.tuweni.bytes.Bytes::get and
   org.apache.tuweni.bytes.Bytes::getInt, both megamorophic interface
   methods that Hotspot cannot easily optimize.
   
   The performance change is to go to straight primitive manipulation for
   hot cases. This resulted in a 75% speedup in one ad-hoc benchmark
   modeling a EVM Transaction execution.
   
   Signed-off-by: Danno Ferrin <da...@gmail.com>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tuweni.apache.org
For additional commands, e-mail: dev-help@tuweni.apache.org


[GitHub] [incubator-tuweni] atoulme commented on pull request #74: Performance - Faster UInt256/Bytes32 conversions

Posted by GitBox <gi...@apache.org>.
atoulme commented on pull request #74:
URL: https://github.com/apache/incubator-tuweni/pull/74#issuecomment-621957397


   Nice! I wonder if we could even makes Bytes32 implement UInt256 to simplify things further. WDYT?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tuweni.apache.org
For additional commands, e-mail: dev-help@tuweni.apache.org


[GitHub] [incubator-tuweni] shemnon commented on pull request #74: Performance - Faster UInt256/Bytes32 conversions

Posted by GitBox <gi...@apache.org>.
shemnon commented on pull request #74:
URL: https://github.com/apache/incubator-tuweni/pull/74#issuecomment-622084083


   It could lead to circular dependencies, and would need some benchmarking since uint256 is int array based and the math operations might not get as favorable a treatment by hotspot.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tuweni.apache.org
For additional commands, e-mail: dev-help@tuweni.apache.org