Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/english/hpc/number-theory/montgomery.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,4 @@ int inverse(int _a) {

While vanilla binary exponentiation with a compiler-generated fast modulo trick requires ~170ns per `inverse` call, this implementation takes ~166ns, going down to ~158ns we omit `transform` and `reduce` (a reasonable use case is for `inverse` to be used as a subprocedure in a bigger modular computation). This is a small improvement, but Montgomery multiplication becomes much more advantageous for SIMD applications and larger data types.

**Exercise.** Implement efficient *modular* [matix multiplication](/hpc/algorithms/matmul).
**Exercise.** Implement efficient *modular* [matrix multiplication](/hpc/algorithms/matmul).