Virtual call optimizations #266
Labels
complexity 3: major effort
This requires some commitment to pull off properly.
kind: perf: language
We can make the language faster!
There are a variety of performance optimizations we can make to the virtual call system, which are related enough that they can probably be tackled together:
Reduce the size of virtual tables by avoiding including methods in it unless a call site for that method was reached that:
:trait
ptr
on a(Bytes'box | String'box)
variable)Automatic specialization of functions (in
--release
mode only, since it's likely to be expensive)reach
analysis, but with the more specific pseudo-reifications:struct
/:numeric
valuesEDIT 2022-04-01:
TCP.Engine
into concrete typesTCP.Engine.Posix
andTCP.Engine.Windows
that both fulfill the same trait, and guard their creation with platform-specific conditionals, then the compiler should be smart enough to devirtualize all of the abstract calls into concrete ones.The text was updated successfully, but these errors were encountered: