Frank Denis
7cfeae1ce7
std.crypto.onetimeauth.ghash: faster GHASH on modern CPUs ( #13566 )
...
* std.crypto.onetimeauth.ghash: faster GHASH on modern CPUs
Carryless multiplication was slow on older Intel CPUs, justifying
the need for using Karatsuba multiplication.
This is not the case any more; using 4 multiplications to multiply
two 128-bit numbers is actually faster than 3 multiplications +
shifts and additions.
This is also true on aarch64.
Keep using Karatsuba only when targeting x86 (granted, this is a bit
of a brutal shortcut, we should really list all the CPU models that
had a slow clmul instruction).
Also remove useless agg_2 treshold and restore the ability to
precompute only H and H^2 in ReleaseSmall.
Finally, avoid using u256. Using 128-bit registers is actually faster.
* Use a switch, add some comments
2022-11-17 13:07:07 +01:00
..
2022-10-13 12:53:20 -07:00
2022-11-15 23:23:27 +02:00
2022-11-09 17:36:40 +02:00
2022-10-18 14:15:16 +03:00
2022-11-17 13:07:07 +01: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-11-12 21:03:24 +02:00
2022-10-30 01:09:31 -07:00
2022-11-12 21:03:24 +02: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-11-12 21:03:24 +02:00
2022-11-16 01:12:27 +02:00
2022-05-04 21:26:48 +02:00
2022-07-13 16:10:41 -07:00
2022-11-16 19:02:24 -05:00
2022-08-30 13:02:17 +03:00
2022-11-06 13:39:03 +01:00
2022-06-25 21:27:56 -07:00
2022-11-01 12:49:13 +01:00
2021-12-16 19:08:58 -08:00
2022-01-01 12:47:08 +00:00
2022-08-22 13:55:00 +03:00
2022-11-13 17:43:29 +02:00
2022-11-06 13:39:03 +01:00
2022-10-03 22:57:53 -04:00
2022-09-16 14:46:53 -04:00
2022-10-29 15:22:05 -04:00
2022-11-04 00:09:27 +03:30
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-11-04 00:09:27 +03:30
2022-11-12 21:03:24 +02:00
2022-11-13 17:36:56 +02:00
2022-10-03 12:59:47 +03:00
2022-11-04 00:09:27 +03:30
2022-06-11 23:49:33 +03:00
2022-11-06 23:52:41 +01:00
2021-11-30 23:32:47 +00:00
2022-11-12 21:03:24 +02:00
2022-08-23 21:11:02 -07:00
2022-05-27 16:43:33 -04:00
2022-11-04 00:09:27 +03:30
2022-10-05 21:19:30 +02:00
2021-11-30 23:32:47 +00:00
2022-11-12 21:03:24 +02:00
2022-10-29 14:30:46 -07:00
2022-09-16 14:46:53 -04:00
2022-01-07 00:06:06 -05:00
2022-11-05 22:55:50 +01:00
2022-05-11 15:43:18 -04:00
2022-11-05 10:15:01 +01: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-11-04 00:09:27 +03:30
2022-11-12 15:41:55 +02:00
2022-11-09 17:33:48 +02:00
2022-11-04 16:04:31 +02:00
2022-11-01 20:38:37 -04:00
2022-11-12 21:03:24 +02:00
2022-11-05 15:43:39 -04:00
2022-08-22 11:19:20 +03:00
2022-11-12 09:40:40 +01:00
2022-09-16 14:46:53 -04:00
2022-09-16 14:46:53 -04:00
2022-11-16 18:51:11 -05: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-11-12 21:03:24 +02:00
2022-10-18 14:15:16 +03:00
2022-03-10 13:13:17 -05:00
2022-11-05 02:34:24 -04:00
2022-11-04 00:09:27 +03:30
2022-05-11 15:43:18 -04:00
2022-11-12 21:03:24 +02:00
2022-11-12 21:03:24 +02:00
2022-11-04 00:09:27 +03:30
2022-11-02 23:20:19 +01: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-11-04 00:09:27 +03:30
2022-11-12 21:03:24 +02:00
2022-06-11 23:49:33 +03:00
2022-11-16 18:49:04 -05:00