Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
MasterDuke so, `MVM_SPESH_BLOCKING=1 ./rakudo-m -e 'use nqp; my $a = "src/core.c/Int.pm6".IO.slurp; my $b; my $s = now; $b := nqp::sha1($a) for ^10_000; say now - $s; say $b'` takes ~0.58s 22:11
but `MVM_SPESH_BLOCKING=1 ./rakudo-m -e 'use nqp; my int @a = "src/core.c/Int.pm6".IO.slurp(:bin); my $b; my $s = now; $b := nqp::binarysha1(@a) for ^10_000; say now - $s; say $b'` takes ~0.22s 22:12
think it's worth adding the op? 22:14
japhb MasterDuke: Why are you assigning @a? A Blob already has REPR VMArray, so you can just bind to a scalar, yes? 23:28
Oh, also I bet that construction is expanding the bytes to 64-bit slots ... 23:31