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 ooh, i think i have a relatively simple change that speeds up startup/deserialization. not by a whole lot of wallclock, but instructions reported by callgrind for `raku -e ''` do go down: as is, with MVM_SPESH_BLOCKING=1, and with MVM_SPESH_DISABLE=1 01:21
we deserialize almost 90k VMArrays. in it's deserialize(), we loop over the number of elems, and switch based on the array type what we read. but the array type doesn't change per element, so it's a bit of code duplication, but just moving/copying the loop inside each case makes a difference 01:26
with MVM_SPESH_DISABLE=1 we go from ~626k to ~623k instructions and with MVM_SPESH_BLOCKING=1 from ~1.135b to ~1.132b instructions 01:31
Geth MoarVM: MasterDuke17++ created pull request #1738:
Speedup VMArray's deserialize()...
02:17
Voldenet nine: and high level code will require some additional allocations which will increase startup time, it's a good tradeoff though 03:48
MasterDuke: I've read some blogpost about rust doing 2x more instructions than C code in the same time and vtune revealed that cpu itself was able to optimize it very well, keep that in mind 03:59
Woodi "everything is a first class object" - do that means that it need to be created via mop or can be just loaded or allocated in ready shape from C ? what exactly are unavoidable costs ? becouse years flys... 04:40
also got thinking: benchmarks show nqp and rakudo is more costly - so maybe there things need to be optimized ? like in startup path using only primitive types like native arrays instead of hashes, uint64_ counters instead of packed numbers, etc ? 04:42
and removing things that keep allocating and deallocating on startup... 04:44
timo1 the majority of our classes get their layout, i.e. fields and attributes and such, deserialized cheaply, not created with MOP calls during startup 08:12
i don't know what you mean by packed numbers 08:13
nine probably boxed numbers 08:17
timo1 ah