On a potential "Partial Monomorphization"

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • rust

    Empowering everyone to build reliable and efficient software.

  • You also don't need to stick with one strategy for everything. You can treat this as an optimization problem, and choose how much to specialize for each parameter, perhaps based on how it's used. Swift goes so far as to build a fully polymorphic version of exported functions, then specialize them internally and based on opt-in annotations: https://gankra.github.io/blah/swift-abi/. There have also been attempts to approach this from the other direction in Rust, by detecting cases where a function doesn't make any use of a type's layout: https://github.com/rust-lang/rust/pull/69749

  • proposal

    Go Project Design Documents

  • Also take a look at https://github.com/golang/proposal/blob/master/design/generics-implementation-gcshape.md. This is a hybrid approach (like the one you're talking about) the Go compiler takes for its generics implementation. It uses GC allocation size classes ("shapes") to figure out how to group types that need to be monomorphized.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts