jonsykkel[asciilifeform]: re ch13:
jonsykkel[asciilifeform]: 1. did u consider this kinda algo http://zzz.st/up/wVl3rn2q/ (no idea how to do the weird ada aray indexing)
jonsykkel[asciilifeform]: 2. FZ_ShiftRight_O_I with count=0 relys on Shift_Left(x, bitness) shifting all bits out of existence, which raises folowing sub-questions:
jonsykkel[asciilifeform]: 2a. dose ada standard guarante this? im couldnt find anything about it in pdf
jonsykkel[asciilifeform]: 2b. x86 masks the shift count so "shl rax, 64" dosnt do anything, so it must compile to som sort of conditional or weird thing. i chekd asebly output from my gnat, it semed to produce not a jump but cmp 0x40 then cmov
jonsykkel[asciilifeform]: 3. new w_borow function sems to result in somwat slower code, using all compilers i had lying around. duno how to explain that but intresting. the mod exp from ch7 http://zzz.st/up/bcOOg3it/
jonsykkel[asciilifeform]: i supose my algo creates difrent memory aces patern based on sekrit shift count
asciilifeform: jonsykkel: aaaha
asciilifeform: not so 'quiet', is it, then.
jonsykkel[asciilifeform]: yes i undersand now
jonsykkel[asciilifeform]: CONSTANT-SPACETIME
asciilifeform: right
asciilifeform: re w_borrow & shift -- these arguably belong asm'ified (as later bvt did) in practice
asciilifeform: the ada version is 'canonical' tho, and if jonsykkel (or anyone else) finds bug (incl. branches/accesses on seekrit bitz) in it, asciilifeform would much like to hear about it
asciilifeform: speedups of const factor in the ada not nearly so much of a concern tho
asciilifeform: (speed-sensitive applications oughta use asmified word arithmetic & carries)
jonsykkel[asciilifeform]: naturaly. question 2b re shift was about constanttimeness of generated code tho
asciilifeform: jonsykkel: would concern the variant where HaveBarrelShifter enabled. empirically did not detect (with random inputs) any correlation, but perhaps worth measuring moar precisely (if yer right re cmov)
asciilifeform suspects that cmov does not give cycle count variance on x86/64, but may give variance in amperage, depending on whether a write occurs, whether cache invalidated, etc
asciilifeform: would be interesting to search for other verboten conditionals in the compiled bins
asciilifeform: (perhaps there's a clever automated tool for this? if not, oughta be)
asciilifeform was in fact planning to audit bins before production use, but 'war ended' befoar this could happen
jonsykkel[asciilifeform]: suspects that cmov does not give cycle count variance on x86/64 << wouldnt think so either, was thinking more about posibility of some compilers generating a jump
asciilifeform: jonsykkel: even w/out a jump, potentially leaks info, see above
asciilifeform not recalls whether cmov invalidates cache when not-taken
jonsykkel[asciilifeform]: posible
asciilifeform: see here re shifter tests.