{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/py-evm/issues/138","repository_url":"https://api.github.com/repos/ethereum/py-evm","labels_url":"https://api.github.com/repos/ethereum/py-evm/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/py-evm/issues/138/comments","events_url":"https://api.github.com/repos/ethereum/py-evm/issues/138/events","html_url":"https://github.com/ethereum/py-evm/issues/138","id":274008928,"node_id":"MDU6SXNzdWUyNzQwMDg5Mjg=","number":138,"title":"PyPy investigation notes","user":{"login":"carver","id":205327,"node_id":"MDQ6VXNlcjIwNTMyNw==","avatar_url":"https://avatars0.githubusercontent.com/u/205327?v=4","gravatar_id":"","url":"https://api.github.com/users/carver","html_url":"https://github.com/carver","followers_url":"https://api.github.com/users/carver/followers","following_url":"https://api.github.com/users/carver/following{/other_user}","gists_url":"https://api.github.com/users/carver/gists{/gist_id}","starred_url":"https://api.github.com/users/carver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carver/subscriptions","organizations_url":"https://api.github.com/users/carver/orgs","repos_url":"https://api.github.com/users/carver/repos","events_url":"https://api.github.com/users/carver/events{/privacy}","received_events_url":"https://api.github.com/users/carver/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-15T02:03:39Z","updated_at":"2018-06-18T19:18:50Z","closed_at":"2018-03-27T21:56:06Z","author_association":"CONTRIBUTOR","body":"I was curious how fast py-evm would run in pypy, and it sent me down a rabbit hole. This issue is just a way to note what I learned along the way.\r\n\r\n- pypy won't work out of the box because of the dependency on pysha3 (via eth-bloom), which [fails to compile under pypy](https://bitbucket.org/pypy/pypy/issues/2687/pypy3-is-missing-pystrhexh-breaking-pysha3)\r\n- I ran eth-bloom tests as a rough speed proxy with several different configurations:\r\n  - pysha3: 0.5s\r\n  - [pure python implementation](https://github.com/ctz/keccak/blob/master/keccak.py) in cpython: 25s\r\n  - pure python implementation in pypy: 9.5s\r\n  - pure python implementation in cython: 20.5s\r\n  - after a couple of type annotations in cython: 16.5s\r\n  - cython in pypy: crash at runtime with `TypeError: object.__new__(builtin_function_or_method) is not safe, use builtin_function_or_method.__new__()`\r\n- Optimizing sha3 in cython doesn't matter if it doesn't work under pypy (because we might as well keep the c extension version). Although I do expect that it would be possible to make it work under pypy with some tweaks.\r\n- Punting on pypy and working on a cython trie implementation (which was Piper's first instinct) might be the most fruitful next step"},"comment":{"url":"https://api.github.com/repos/ethereum/py-evm/issues/comments/398165340","html_url":"https://github.com/ethereum/py-evm/issues/138#issuecomment-398165340","issue_url":"https://api.github.com/repos/ethereum/py-evm/issues/138","id":398165340,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODE2NTM0MA==","user":{"login":"jsw-qkc","id":39756113,"node_id":"MDQ6VXNlcjM5NzU2MTEz","avatar_url":"https://avatars1.githubusercontent.com/u/39756113?v=4","gravatar_id":"","url":"https://api.github.com/users/jsw-qkc","html_url":"https://github.com/jsw-qkc","followers_url":"https://api.github.com/users/jsw-qkc/followers","following_url":"https://api.github.com/users/jsw-qkc/following{/other_user}","gists_url":"https://api.github.com/users/jsw-qkc/gists{/gist_id}","starred_url":"https://api.github.com/users/jsw-qkc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsw-qkc/subscriptions","organizations_url":"https://api.github.com/users/jsw-qkc/orgs","repos_url":"https://api.github.com/users/jsw-qkc/repos","events_url":"https://api.github.com/users/jsw-qkc/events{/privacy}","received_events_url":"https://api.github.com/users/jsw-qkc/received_events","type":"User","site_admin":false},"created_at":"2018-06-18T19:18:50Z","updated_at":"2018-06-18T19:18:50Z","author_association":"NONE","body":"@carver \r\n\r\nI'm still unable to get py-evm to play nicely with pypy3. Running:\r\n\r\n```\r\npypy3 -m pip install git+git://github.com/ethereum/py-evm\r\n```\r\n\r\nstill yields \r\n\r\n```\r\nModules/_sha3/backport.inc:78:22: fatal error: pystrhex.h: No such file or directory\r\n```\r\n\r\nAm I missing something here?"}}
{"actor":{"display_login":"jsw-qkc"}}