Cody Tapscott
10edb6d352
crypto.sha2: Use intrinsics for SHA-256 on x86-64 and AArch64
...
There's probably plenty of room to optimize these further in the
future, but for the moment this gives ~3x improvement on Intel
x86-64 processors, ~5x on AMD, and ~10x on M1 Macs.
These extensions are very new - Most processors prior to 2020 do
not support them.
AVX-512 is a slightly older alternative that we could use on Intel
for a much bigger performance bump, but it's been fused off on
Intel's latest hybrid architectures and it relies on computing
independent SHA hashes in parallel. In contrast, these SHA intrinsics
provide the usual single-threaded, single-stream interface, and should
continue working on new processors.
AArch64 also has SHA-512 intrinsics that we could take advantage
of in the future
2022-10-28 15:21:10 -07:00
..
2022-10-13 12:53:20 -07:00
2022-10-25 20:48:08 +02:00
2022-10-21 18:32:56 -04:00
2022-10-18 14:15:16 +03:00
2022-10-28 15:21:10 -07:00
2022-05-09 18:51:46 +02:00
2022-10-13 13:33:45 +02:00
2022-08-22 11:19:20 +03:00
2022-10-27 22:00:47 -04:00
2022-08-22 11:19:20 +03:00
2022-09-12 18:13:24 -07:00
2022-10-06 21:22:20 +03:00
2022-08-27 11:17:48 +03:00
2022-07-23 13:52:16 +03:00
2022-10-15 10:36:10 -07:00
2022-10-27 01:31:18 +03:00
2022-05-04 21:26:48 +02:00
2022-07-13 16:10:41 -07:00
2022-10-27 20:51:35 -04:00
2022-08-30 13:02:17 +03:00
2022-10-20 09:21:06 -07:00
2022-06-25 21:27:56 -07:00
2022-10-17 18:15:15 -05:00
2021-12-16 19:08:58 -08:00
2022-01-01 12:47:08 +00:00
2021-10-04 23:48:55 -07:00
2022-08-22 13:55:00 +03:00
2022-10-27 22:00:47 -04:00
2022-10-28 17:59:32 -04:00
2022-10-03 22:57:53 -04:00
2022-09-16 14:46:53 -04:00
2022-08-17 20:08:13 +02:00
2022-04-19 19:42:15 -05:00
2022-09-29 21:45:30 +03:00
2022-10-05 21:33:42 +02:00
2022-08-16 20:35:03 +03:00
2022-05-11 18:41:23 -06:00
2022-03-01 13:28:47 -05:00
2022-10-19 13:24:06 -04:00
2022-10-21 12:40:33 -07:00
2022-09-29 21:45:30 +03:00
2022-10-03 12:59:47 +03:00
2022-08-31 19:30:51 +02:00
2022-06-11 23:49:33 +03:00
2021-08-24 12:25:09 -07:00
2022-07-01 13:18:08 +02:00
2021-11-30 23:32:47 +00:00
2022-10-21 12:40:33 -07:00
2022-08-23 21:11:02 -07:00
2022-05-27 16:43:33 -04:00
2022-08-27 11:17:48 +03:00
2022-10-05 21:19:30 +02:00
2021-09-01 17:54:06 -07:00
2021-11-30 23:32:47 +00:00
2022-10-25 09:04:04 -07:00
2022-10-18 12:57:21 -04:00
2022-09-16 14:46:53 -04:00
2022-01-07 00:06:06 -05:00
2022-10-18 14:15:16 +03:00
2022-05-11 15:43:18 -04:00
2022-09-07 22:42:57 +02:00
2022-09-20 00:50:13 +03:00
2022-08-22 11:19:20 +03:00
2022-09-11 23:18:43 -04:00
2022-09-16 14:46:53 -04:00
2022-09-18 10:00:04 +02:00
2022-10-15 12:11:55 -04:00
2022-09-20 00:50:13 +03:00
2022-10-16 11:35:27 -04:00
2022-09-16 14:46:53 -04:00
2022-07-25 22:04:30 +03:00
2021-11-09 18:31:03 -07:00
2022-10-27 20:39:35 -04:00
2022-08-22 11:19:20 +03:00
2022-08-17 16:36:02 -04:00
2022-09-16 14:46:53 -04:00
2022-09-16 14:46:53 -04:00
2022-09-14 14:42:58 -07:00
2022-10-18 18:53:44 -07:00
2022-09-29 21:45:30 +03:00
2022-10-13 13:57:20 +02:00
2022-07-25 22:04:30 +03:00
2022-10-18 14:15:16 +03:00
2022-03-10 13:13:17 -05:00
2021-12-19 00:24:45 -05:00
2022-09-07 22:42:55 +02:00
2022-05-11 15:43:18 -04:00
2022-10-27 21:15:22 -04:00
2022-10-05 21:19:10 +02:00
2022-09-12 18:13:24 -07:00
2022-05-27 16:43:33 -04:00
2022-04-15 17:01:01 -05:00
2022-06-17 21:04:21 +03:00
2022-06-11 11:02:56 +03:00
2022-01-07 00:06:06 -05:00
2022-01-04 17:59:05 +01:00
2022-06-11 23:49:33 +03:00
2022-09-13 20:26:04 -04:00