3 ms·
My biggest problem with assembly was coming up with names for all of the labels :) One of the hardest problems of CS... naming! How does PeachPY handle loops?
by lfowles 11y ago
My biggest problem with assembly was coming up with names for all of the labels :)
One of the hardest problems of CS... naming!
How does PeachPY handle loops? I'm looking for examples, but will it generate a label for me and then let me specify the contents only?
Edit: https://github.com/Maratyszcza/PeachPy/blob/master/examples/make/matmul-opt.py https://github.com/Maratyszcza/PeachPy/blob/master/examples/... !
(Add a bit more, give it some static typing and soon we'll be coding C in Python)
- pbsd 11y agoThat's how you unroll a loop, not how you write one. As far as I can tell in PeachPy you can do something similar with anonymous labels: counter = GeneralPurposeRegister64() MOV(counter, 64) with Loop() as loop: ... DEC(counter) JNZ(loop.begin)
- lfowles 11y agoThanks for the clarification, that's still a decent improvement.