Permalink
Please sign in to comment.
Browse files
A better fix for OPy determinism: add __hash__ on Block.
It now uses a deterministic integer ID instead of id(), which is based on the memory address. Verified that ALL bytecode in _build/oil/bytecode-opy/... is stable across machines. With the sorted() fix, it would pass opy-determinism-loop on core/word_compile.py. However, there was still nondeterminism across machines. This is likely due to the fact that I used sorted(), but __cmp__ wasn't specified. Adding __hash__ results in a process that's still deterministic, and presumably faster than calling sorted() everywhere.
- Loading branch information...
Showing
with
22 additions
and 8 deletions.
- +9 −3 opy/compiler2/pyassem.py
- +13 −5 opy/smoke.sh
0 comments on commit
3cfc21b