Time Nick Message 17:26 pgimeno cheapie: maybe try BLAKE2b as a hash? https://en.wikipedia.org/wiki/BLAKE_%28hash_function%29#BLAKE2 17:29 pgimeno oh wait, it's 32 bit 17:33 pgimeno BLAKE2s then 17:41 cheapie pgimeno: Is that faster? 17:41 cheapie Remember that RVController has Zknh for SHA-256/512 but no hardware acceleration for BLAKE2 17:42 pgimeno "BLAKE2b is faster than MD5, SHA-1, SHA-2, and SHA-3, on 64-bit x86-64 and ARM architectures." 17:42 cheapie On ones with or without SHA-2 acceleration instructions? 17:42 pgimeno BLAKE2b is the 64-bit version, BLAKE2s the 32-bit one 17:42 cheapie On x86 those instructions are quite recent 17:43 pgimeno I presume so. The number of rounds is just 10, compared to 64 for MD5. 17:43 cheapie Yes, but the round function looks quite a bit more complex 17:44 pgimeno does it? 17:45 cheapie Compared to the actually quite few instructions in the compression loop for my SHA-256 implementation, yes 17:45 cheapie I have 32 instructions in the body of that loop, if I counted right 17:46 cheapie (not counting the progress bar code) 17:46 pgimeno ah, I was comparing it to MD5, not to your implementation 17:46 cheapie MD5 is broken and automatically disqualified 17:47 pgimeno speed-wise it's a good reference though 17:49 cheapie You're welcome to try implementing BLAKE2 (of whatever sort) and see if you can make it go faster, but I have no plans to 17:52 cheapie Maybe sometime I might try getting RVController to do SHA-512, Zknh actually does provide sigma/sum instructions for that even on RV32 17:53 cheapie Or if I ever make an "RVC64"... :P 19:40 pgimeno cheapie: what command line do I use to assemble with riscv64-unknown-elf-as? specifically what -march do I use to assemble sha256.S? 19:40 cheapie It's riscv32be, see the included Makefile 19:42 cheapie RVController's full march option is -march=rv32imacbzicboz_zicfilp_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zilsd_zimop_zabha_zacas_zalasr_zawrs_zcb_zclsd_zcmop_zcmp_zcmt_zbc_zk_zkr_zks but not all of these are needed for that program 19:42 pgimeno ah missed the makefile, thanks 19:43 cheapie If you don't have a riscv32be toolchain, see the big-endian section of doc/toolchain.txt (you just need binutils) 19:47 pgimeno hm, my binutils is the one which comes with Debian (riscv64-unknown-elf-as) and doesn't support that arch 19:47 cheapie Yeah, if you're on Debian (I am too) you will have to follow the instructions in doc/toolchain.txt to build your own binutils 19:47 pgimeno darn, ok 19:48 cheapie It's not actually that hard to do, just edit the included script to match the paths you want to use and then the rest is just copy/pasting a few commands 19:51 cheapie If passworddoor is the one you're wanting to build, that one is actually a mix of both endiannesses, but it builds with a big-endian toolchain. Most of the other programs in there are little-endian 19:53 pgimeno I'm going to give it a try to blake2s to compare it with sha256 19:53 pgimeno or that's the plan, not sure how far I'll go 19:54 cheapie ah 19:55 cheapie You may want to play with the INSTRUCTIONS_PER_CLOCK and CLOCK_SPEED settings near the top of rvcontroller.lua to match the environment you plan to run it in - the defauts of 50 and 20 are for VE-C, more restrictive servers will need lower numbers 19:56 cheapie IIRC the defaults in mesecons are so restrictive that I have to turn them down to something like 5 and 15 *and* reduce the RAM size to get it not overheat or time out on a server running the default settings 20:00 cheapie Oh, and you will probably want to compare to the SHA-256 implementation in passworddoor and not the standalone one, the standalone one hasn't had some of the optimizations I did in passworddoor 20:58 pgimeno turns out the loader overheated too, I had to set interrupt(0.2,"tick") (and, binutils compiled successfully after a painful hour or so of failed attempts to build due to missing dependencies) 21:01 Sheriff_U3 amazing first time creating a schematic table in lua and I got it right first try without really knowing where each node would generate. 21:15 pgimeno cheapie: any settings I can tweak besides luacontroller_maxevents? raising it to 60000 from the default 10000 doesn't seem to do much 21:16 pgimeno the luacontroller docs are severely lacking settings-wise 23:05 cheapie pgimeno: We run 150000 on VE-C, if you want to do lower you just need to turn INSTRUCTIONS_PER_CLOCK down. You do need to restart the server after changing it