)]}' { "commit": "02514002fd67e9494294e6020878c844a3fe9b83", "tree": "70a0725a61b4781ac38e901483ad21973912b838", "parents": [ "2056d7290a05c9cfd98889ef8b5519ddc81bd4d8" ], "author": { "name": "David Benjamin", "email": "davidben@google.com", "time": "Wed Nov 22 11:08:45 2017 -0500" }, "committer": { "name": "Adam Langley", "email": "agl@google.com", "time": "Wed Nov 22 21:56:05 2017 +0000" }, "message": "Use dec/jnz instead of loop in bn_add_words and bn_sub_words.\n\nImported from upstream\u0027s a78324d95bd4568ce2c3b34bfa1d6f14cddf92ef. I\nthink the \"regression\" part of that change is some tweak to BN_usub and\nI guess the bn_*_words was to compensate for it, but we may as well\nimport it. Apparently the loop instruction is terrible.\n\nBefore:\nDid 39871000 bn_add_words operations in 1000002us (39870920.3 ops/sec)\nDid 38621750 bn_sub_words operations in 1000001us (38621711.4 ops/sec)\n\nAfter:\nDid 64012000 bn_add_words operations in 1000007us (64011551.9 ops/sec)\nDid 81792250 bn_sub_words operations in 1000002us (81792086.4 ops/sec)\n\nloop sets no flags (even doing the comparison to zero without ZF) while\ndec sets all flags but CF, so Andres and I are assuming that because\nthis prevents Intel from microcoding it to dec/jnz, they otherwise can\u0027t\nbe bothered to add more circuitry since every compiler has internalized\nby now to never use loop.\n\nChange-Id: I3927cd1c7b707841bbe9963e3d4afd7ba9bd9b36\nReviewed-on: https://boringssl-review.googlesource.com/23344\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "4059dcc2904e06d9d966b79947ebd0726e4560e5", "old_mode": 33188, "old_path": "crypto/fipsmodule/bn/asm/x86_64-gcc.c", "new_id": "49351c1a5cf227874a589aa7da976746e35eabf9", "new_mode": 33188, "new_path": "crypto/fipsmodule/bn/asm/x86_64-gcc.c" } ] }