rfc:protocol_type_hinting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
rfc:protocol_type_hinting [2013/06/26 15:16] – Update RFC, renaming to Structural Typing ircmaxell | rfc:protocol_type_hinting [2013/06/26 15:17] – [Performance] ircmaxell | ||
---|---|---|---|
Line 194: | Line 194: | ||
When run once (with $times = 1): | When run once (with $times = 1): | ||
- | '' | + | '' |
- | Structural in 1.4066696166992E-5 seconds, 1.4066696166992E-5 seconds per run | + | |
- | Native in 6.9141387939453E-6 seconds, 6.9141387939453E-6 seconds per run'' | + | '' |
+ | |||
+ | '' | ||
The margin of error for the test is approximately the same difference as between Interface and Structural. This means that the performance for a single run is about constant. | The margin of error for the test is approximately the same difference as between Interface and Structural. This means that the performance for a single run is about constant. | ||
Line 204: | Line 206: | ||
When run with $times = 1000000; | When run with $times = 1000000; | ||
- | '' | + | '' |
- | Structural in 0.48089909553528 seconds, 4.8089909553528E-7 seconds per run | + | |
- | Native in 0.3850359916687 seconds, 3.850359916687E-7 seconds per run'' | + | '' |
+ | |||
+ | '' | ||
In this case, the margin of error was less than the difference, meaning that the Structural approach is slightly more performant at runtime than the interface based approach. | In this case, the margin of error was less than the difference, meaning that the Structural approach is slightly more performant at runtime than the interface based approach. |
rfc/protocol_type_hinting.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1