File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -347,10 +347,12 @@ As the example demonstrates, invocation of a multi-method cannot be ambiguous:
347347Collide 2 is preferred over collide 1 because the resolution works from left to
348348right. Thus ` Unit, Thing ` is preferred over ` Thing, Unit ` .
349349
350- ** Performance note** : Nim does not produce a virtual method table, but
351- generates dispatch trees. This avoids the expensive indirect branch for method
352- calls and enables inlining. However, other optimizations like compile time
353- evaluation or dead code elimination do not work with methods.
350+ ** Performance note** : Nim generates dispatch trees for methods by default.
351+ With ` --experimental:vtables ` , it also provides an option to generate
352+ a virtual method table for methods,
353+ which tends to produce better performance in general,
354+ especially for deep object hierarchies.
355+ However, other optimizations like compile time evaluation or dead code elimination do not work with methods.
354356
355357
356358Exceptions
You can’t perform that action at this time.
0 commit comments