add benchmark of Firefox and Safari

dev
MITSUNARI Shigeo 7 years ago
parent 652c349141
commit 9922b0ccf9
  1. 8
      Makefile
  2. 21
      readme.md

@ -234,11 +234,15 @@ endif
emcc -o $@ src/fp.cpp src/she_c256.cpp $(EMCC_OPT) -s TOTAL_MEMORY=67108864
../mcl-wasm/mcl_c.js: src/fp.cpp src/bn_c256.cpp include/mcl/bn.h Makefile
emcc -o $@ src/fp.cpp src/bn_c256.cpp $(EMCC_OPT)
emcc -o $@ src/fp.cpp src/bn_c256.cpp $(EMCC_OPT) -DMCL_MAX_BIT_SIZE=256
../mcl-wasm/mcl_c512.js: src/fp.cpp src/bn_c512.cpp include/mcl/bn.h Makefile
emcc -o $@ src/fp.cpp src/bn_c512.cpp $(EMCC_OPT) -DMCL_MAX_BIT_SIZE=512
mcl-wasm:
$(MAKE) ../mcl-wasm/mcl_c.js
$(MAKE) ../mcl-wasm/mcl_c512.js
clean:
$(RM) $(MCL_LIB) $(MCL_SLIB) $(BN256_LIB) $(BN256_SLIB) $(BN384_LIB) $(BN384_SLIB) $(BN512_LIB) $(BN512_SLIB) $(OBJ_DIR)/*.o $(OBJ_DIR)/*.d $(EXE_DIR)/*.exe $(GEN_EXE) $(ASM_OBJ) $(LIB_OBJ) $(BN256_OBJ) $(BN384_OBJ) $(BN512_OBJ) $(LLVM_SRC) $(FUNC_LIST) src/*.ll
@ -254,7 +258,7 @@ install: lib/libmcl.a lib/libmcl$(SHARE_BASENAME_SUF).$(LIB_SUF)
$(MKDIR) $(PREFIX)/lib
cp -a lib/libmcl.a lib/libmcl$(SHARE_BASENAME_SUF).$(LIB_SUF) $(PREFIX)/lib/
.PHONY: test
.PHONY: test mcl-wasm
# don't remove these files automatically
.SECONDARY: $(addprefix $(OBJ_DIR)/, $(ALL_SRC:.cpp=.o))

@ -51,15 +51,18 @@ cmake -DARITH=x64-asm-254 -DFP_PRIME=254 -DFPX_METHD="INTEG;INTEG;LAZYR" -DPP_ME
```
## Higher-bit BN curve benchmark by mcl
* Benchmark on Kaby Lake Core i7-7700(3.6GHz)
* `test/bn_test.cpp` for CurveFpBN254BNb
* `test/bn512_test.cpp` for CurveFp382_1 and CurveFp461
paramter | x64(msec)|
----------------|------------|
CurveFpBN254BNb | 0.29|
CurveFp382_1 | 0.95|
CurveFp461 | 2.16|
paramter | x64| Firefox on x64|Safari on iPhone7|
----------------|-----|---------------|-----------------|
CurveFpBN254BNb | 0.29| 2.48| 4.78|
CurveFp382_1 | 0.95| 7.91| 11.74|
CurveFp462 | 2.16| 14.73| 22.77|
* x64 : 'Kaby Lake Core i7-7700(3.6GHz)'.
* Firefox : 64-bit version 58.
* iPhone7 : iOS 11.2.1.
* CurveFpBN254BNb is by `test/bn_test.cpp`.
* CurveFp382_1 and CurveFp462 are by `test/bn512_test.cpp`.
* All the timings are given in ms(milliseconds).
# Installation Requirements

Loading…
Cancel
Save