Skip to content

Instantly share code, notes, and snippets.

View metanivek's full-sized avatar
:shipit:

Kevin Smith metanivek

:shipit:
  • 23:26 (UTC -04:00)
View GitHub Profile
@polytypic
polytypic / article-simplified-msi-model-of-shared-memory.md
Last active January 19, 2023 10:57
Simplified MSI model of shared memory

How can one understand and predict the performance of multicore algorithms?

As a first step, I'd recommend acquiring a basic understanding of the MSI protocol. Modern systems use somewhat more complex protocols, but a basic understanding of MSI should be enough to predict the most important phenomena.

Below is an even further simplified model of shared memory based on the MSI protocol. While the model is not precise, and makes several simplifications not based on actual hardware, it should be accurate enough to predict many

@Hirrolot
Hirrolot / CoC.ml
Last active May 26, 2024 00:04
Barebones lambda cube in OCaml
(* The syntax of our calculus. Notice that types are represented in the same way
as terms, which is the essence of CoC. *)
type term =
| Var of string
| Appl of term * term
| Binder of binder * string * term * term
| Star
| Box
and binder = Lam | Pi