)]}' { "commit": "35be6880788d90bc2a93de5295391b001a8a6a46", "tree": "d409a431abb23acc0095fcf759d016da6fb46845", "parents": [ "0182ecd346add6019e6559ea6f6e515b54c1d78f" ], "author": { "name": "David Benjamin", "email": "davidben@google.com", "time": "Fri Feb 19 18:47:22 2016 -0500" }, "committer": { "name": "Adam Langley", "email": "agl@google.com", "time": "Tue Feb 23 17:19:45 2016 +0000" }, "message": "Enable upstream\u0027s ChaCha20 assembly for x86 and ARM (32- and 64-bit).\n\nThis removes chacha_vec_arm.S and chacha_vec.c in favor of unifying on\nupstream\u0027s code. Upstream\u0027s is faster and this cuts down on the number of\ndistinct codepaths. Our old scheme also didn\u0027t give vectorized code on\nWindows or aarch64.\n\nBoringSSL-specific modifications made to the assembly:\n\n- As usual, the shelling out to $CC is replaced with hardcoding $avx. I\u0027ve\n tested up to the AVX2 codepath, so enable it all.\n\n- I\u0027ve removed the AMD XOP code as I have not tested it.\n\n- As usual, the ARM file need the arm_arch.h include tweaked.\n\nSpeed numbers follow. We can hope for further wins on these benchmarks after\nimporting the Poly1305 assembly.\n\nx86\n---\nOld:\nDid 1422000 ChaCha20-Poly1305 (16 bytes) seal operations in 1000433us (1421384.5 ops/sec): 22.7 MB/s\nDid 123000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1003803us (122534.0 ops/sec): 165.4 MB/s\nDid 22000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1000282us (21993.8 ops/sec): 180.2 MB/s\nDid 1428000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000214us (1427694.5 ops/sec): 22.8 MB/s\nDid 124000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1006332us (123219.8 ops/sec): 166.3 MB/s\nDid 22000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1020771us (21552.3 ops/sec): 176.6 MB/s\nNew:\nDid 1520000 ChaCha20-Poly1305 (16 bytes) seal operations in 1000567us (1519138.6 ops/sec): 24.3 MB/s\nDid 152000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1004216us (151361.9 ops/sec): 204.3 MB/s\nDid 31000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1009085us (30720.9 ops/sec): 251.7 MB/s\nDid 1797000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000141us (1796746.7 ops/sec): 28.7 MB/s\nDid 171000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1003204us (170453.9 ops/sec): 230.1 MB/s\nDid 31000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1005349us (30835.1 ops/sec): 252.6 MB/s\n\nx86_64, no AVX2\n---\nOld:\nDid 1782000 ChaCha20-Poly1305 (16 bytes) seal operations in 1000204us (1781636.5 ops/sec): 28.5 MB/s\nDid 317000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1001579us (316500.2 ops/sec): 427.3 MB/s\nDid 62000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1012146us (61256.0 ops/sec): 501.8 MB/s\nDid 1778000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000220us (1777608.9 ops/sec): 28.4 MB/s\nDid 315000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1002886us (314093.5 ops/sec): 424.0 MB/s\nDid 71000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1014606us (69977.9 ops/sec): 573.3 MB/s\nNew:\nDid 1866000 ChaCha20-Poly1305 (16 bytes) seal operations in 1000019us (1865964.5 ops/sec): 29.9 MB/s\nDid 399000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1001017us (398594.6 ops/sec): 538.1 MB/s\nDid 84000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1005645us (83528.5 ops/sec): 684.3 MB/s\nDid 1881000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000325us (1880388.9 ops/sec): 30.1 MB/s\nDid 404000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1000004us (403998.4 ops/sec): 545.4 MB/s\nDid 85000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1010048us (84154.4 ops/sec): 689.4 MB/s\n\nx86_64, AVX2\n---\nOld:\nDid 2375000 ChaCha20-Poly1305 (16 bytes) seal operations in 1000282us (2374330.4 ops/sec): 38.0 MB/s\nDid 448000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1001865us (447166.0 ops/sec): 603.7 MB/s\nDid 88000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1005217us (87543.3 ops/sec): 717.2 MB/s\nDid 2409000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000188us (2408547.2 ops/sec): 38.5 MB/s\nDid 446000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1001003us (445553.1 ops/sec): 601.5 MB/s\nDid 90000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1006722us (89399.1 ops/sec): 732.4 MB/s\nNew:\nDid 2622000 ChaCha20-Poly1305 (16 bytes) seal operations in 1000266us (2621302.7 ops/sec): 41.9 MB/s\nDid 794000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1000783us (793378.8 ops/sec): 1071.1 MB/s\nDid 173000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1000176us (172969.6 ops/sec): 1417.0 MB/s\nDid 2623000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000330us (2622134.7 ops/sec): 42.0 MB/s\nDid 783000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1000531us (782584.4 ops/sec): 1056.5 MB/s\nDid 174000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1000840us (173854.0 ops/sec): 1424.2 MB/s\n\narm, Nexus 4\n---\nOld:\nDid 388550 ChaCha20-Poly1305 (16 bytes) seal operations in 1000580us (388324.8 ops/sec): 6.2 MB/s\nDid 90000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1003816us (89657.9 ops/sec): 121.0 MB/s\nDid 19000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1045750us (18168.8 ops/sec): 148.8 MB/s\nDid 398500 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000305us (398378.5 ops/sec): 6.4 MB/s\nDid 90500 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1000305us (90472.4 ops/sec): 122.1 MB/s\nDid 19000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1043278us (18211.8 ops/sec): 149.2 MB/s\nNew:\nDid 424788 ChaCha20-Poly1305 (16 bytes) seal operations in 1000641us (424515.9 ops/sec): 6.8 MB/s\nDid 115000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1001526us (114824.8 ops/sec): 155.0 MB/s\nDid 27000 ChaCha20-Poly1305 (8192 bytes) seal operations in 1033023us (26136.9 ops/sec): 214.1 MB/s\nDid 447750 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000549us (447504.3 ops/sec): 7.2 MB/s\nDid 117500 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1001923us (117274.5 ops/sec): 158.3 MB/s\nDid 27000 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1025118us (26338.4 ops/sec): 215.8 MB/s\n\naarch64, Nexus 6p\n(Note we didn\u0027t have aarch64 assembly before at all, and still don\u0027t have it\nfor Poly1305. Hopefully once that\u0027s added this will be faster than the arm\nnumbers...)\n---\nOld:\nDid 145040 ChaCha20-Poly1305 (16 bytes) seal operations in 1003065us (144596.8 ops/sec): 2.3 MB/s\nDid 14000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1042605us (13427.9 ops/sec): 18.1 MB/s\nDid 2618 ChaCha20-Poly1305 (8192 bytes) seal operations in 1093241us (2394.7 ops/sec): 19.6 MB/s\nDid 148000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000709us (147895.1 ops/sec): 2.4 MB/s\nDid 14000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1047294us (13367.8 ops/sec): 18.0 MB/s\nDid 2607 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1090745us (2390.1 ops/sec): 19.6 MB/s\nNew:\nDid 358000 ChaCha20-Poly1305 (16 bytes) seal operations in 1000769us (357724.9 ops/sec): 5.7 MB/s\nDid 45000 ChaCha20-Poly1305 (1350 bytes) seal operations in 1021267us (44062.9 ops/sec): 59.5 MB/s\nDid 8591 ChaCha20-Poly1305 (8192 bytes) seal operations in 1047136us (8204.3 ops/sec): 67.2 MB/s\nDid 343000 ChaCha20-Poly1305-Old (16 bytes) seal operations in 1000489us (342832.4 ops/sec): 5.5 MB/s\nDid 44000 ChaCha20-Poly1305-Old (1350 bytes) seal operations in 1008326us (43636.7 ops/sec): 58.9 MB/s\nDid 8866 ChaCha20-Poly1305-Old (8192 bytes) seal operations in 1083341us (8183.9 ops/sec): 67.0 MB/s\n\nChange-Id: I629fe195d072f2c99e8f947578fad6d70823c4c8\nReviewed-on: https://boringssl-review.googlesource.com/7202\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "d40df9eff50431ad39e36350f4afc23844ce206c", "old_mode": 33188, "old_path": "BUILDING.md", "new_id": "e1113104e2d0af4bf30f8adae753721527671320", "new_mode": 33188, "new_path": "BUILDING.md" }, { "type": "modify", "old_id": "266e8699ac11384a7a76fd002508e77d2fbc1793", "old_mode": 33188, "old_path": "crypto/chacha/CMakeLists.txt", "new_id": "f9ab02475678f326871447f5dcfff07bba7a7cd4", "new_mode": 33188, "new_path": "crypto/chacha/CMakeLists.txt" }, { "type": "modify", "old_id": "4545101c3103a54a00b91b3ae578dad2f527de60", "old_mode": 33261, "old_path": "crypto/chacha/asm/chacha-armv4.pl", "new_id": "b190445da5a20b1d8a97ee103ea7531947e71b92", "new_mode": 33261, "new_path": "crypto/chacha/asm/chacha-armv4.pl" }, { "type": "modify", "old_id": "6ddb31fb994d7acc8679d7cc0da85cb96c7383a1", "old_mode": 33261, "old_path": "crypto/chacha/asm/chacha-armv8.pl", "new_id": "e6fa144c9edfbd83cf80874629ddcfadbb1738df", "new_mode": 33261, "new_path": "crypto/chacha/asm/chacha-armv8.pl" }, { "type": "modify", "old_id": "850c9172641d5220850a832e8d56e65bd7829d77", "old_mode": 33261, "old_path": "crypto/chacha/asm/chacha-x86.pl", "new_id": "edce43dce53bfea3cfdeed0d1555c5ed85cb3661", "new_mode": 33261, "new_path": "crypto/chacha/asm/chacha-x86.pl" }, { "type": "modify", "old_id": "107fc70819d559b2d9f764fec7b8f14bdd2ff7e4", "old_mode": 33261, "old_path": "crypto/chacha/asm/chacha-x86_64.pl", "new_id": "55b726d230a0af43b7d478cb9626807624538485", "new_mode": 33261, "new_path": "crypto/chacha/asm/chacha-x86_64.pl" }, { "type": "rename", "old_id": "f262033c4b71fd9a193f91bd83afad4d03b8b365", "old_mode": 33188, "old_path": "crypto/chacha/chacha_generic.c", "new_id": "afe1b2ada76a526752c979c2bfd7087e347b1b76", "new_mode": 33188, "new_path": "crypto/chacha/chacha.c", "score": 73 }, { "type": "delete", "old_id": "90d62002f25cbea6b7477661e39f61609d64dcb9", "old_mode": 33188, "old_path": "crypto/chacha/chacha_vec.c", "new_id": "0000000000000000000000000000000000000000", "new_mode": 0, "new_path": "/dev/null" }, { "type": "delete", "old_id": "f18c867e0317d687a4d124147d57cea7bf9baea4", "old_mode": 33188, "old_path": "crypto/chacha/chacha_vec_arm.S", "new_id": "0000000000000000000000000000000000000000", "new_mode": 0, "new_path": "/dev/null" }, { "type": "delete", "old_id": "82aa847f9607d18e54e93816c1c42e080d5e393c", "old_mode": 33188, "old_path": "crypto/chacha/chacha_vec_arm_generate.go", "new_id": "0000000000000000000000000000000000000000", "new_mode": 0, "new_path": "/dev/null" }, { "type": "modify", "old_id": "acc693af28923052966e9ca0c76677022012ee7c", "old_mode": 33188, "old_path": "util/generate_build_files.py", "new_id": "3220122bcdf6807ce6ede5c58c8de457cadf317a", "new_mode": 33188, "new_path": "util/generate_build_files.py" } ] }