github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
02:11 sourceable6 left, bisectable6 left, benchable6 left, coverable6 left, tellable6 left, evalable6 left, nativecallable6 left, quotable6 left, committable6 left, notable6 left, linkable6 left, bloatable6 left, squashable6 left, shareable6 left, releasable6 left, statisfiable6 left, unicodable6 left, greppable6 left 02:12 bloatable6 joined, notable6 joined, quotable6 joined, greppable6 joined, unicodable6 joined, nativecallable6 joined 02:13 bisectable6 joined, tellable6 joined, evalable6 joined, committable6 joined, linkable6 joined, coverable6 joined, sourceable6 joined, statisfiable6 joined 02:14 releasable6 joined, squashable6 joined, benchable6 joined, shareable6 joined 04:41 leont left 06:34 sena_kun joined 09:07 Altai-man joined 09:09 sena_kun left 10:23 patrickb joined 10:47 domidumont joined 11:39 MasterDuke joined 12:47 Kaiepi left 12:56 Kaiepi joined 13:08 sena_kun joined 13:10 Altai-man left 14:09 leont joined 16:20 domidumont left 16:27 domidumont joined 17:07 Altai-man joined 17:10 sena_kun left
tib timotimo : there is difference but it's very small 17:20
even by declaring inside the loop (which is maybe not sufficient to stop optims)
Str -> Int seems to be very slow in comparison : for (1..10_000_000) { my $n ="123"; $n++; } 17:26
timotimo : actually there is well coercion in each iteration 18:07
means for(1..1000) { $^item.starts-with($n) } will do 2000 calls to Str method (multi method Str(Int:D: --> Str:D) {) from src/core.c/Int.pm6 18:09
BUT
for(1..1000) { $^item.starts-with($s) } will do 1000 calls to Str method (multi method Str(Int:D: --> Str:D) {) from src/core.c/Int.pm6 but also 1000 calls to Str method (multi method Str(Str:D:) { self }) from src/core.c/Str.pm6 18:10
so at the end both has 2000 calls but not the same methods and I think it explains the small difference I reported (like 4 or 5 seconds on 30secs when you run 100_000_000 iterations) 18:12
18:32 zakharyas joined 18:35 domidumont left
tib (Just for precision, the other 1000 calls that never change are the coercion of $^item) 18:38
18:47 leont left 18:52 Altai-man left 18:54 sena_kun joined 19:41 vesper left, brrt joined 19:48 vesper11 joined 19:51 zakharyas left 21:07 Altai-man joined 21:10 sena_kun left 21:23 brrt left 21:49 Geth left, Geth joined 22:03 Altai-man left 22:05 zakharyas joined 22:07 patrickb left 22:25 zakharyas left 22:50 vesper11 left 22:56 vesper11 joined 23:52 moon-child is now known as heats-flamesman 23:53 heats-flamesman is now known as moon-chilled