I rewrote the C# benchmark, from here(brainfuck). But the results are disappointing, vala with Ofast will come out 9 seconds, while C# 4, C++ 2.
(I remade Gee.ArrayList in a regular array that gave 3 seconds( was 12), and the Compact classes that gave a second)
Does such an overhead give the use of GLib, or I do not notice something?
PS If I am changing the Tape in to struct I get double free or corruption (fasttop)
[1] 15104 abort (core dumped)./ valabf bench.b
Omg ty, I knew it, but I didn’t think about it at all. Perhaps because in C# there was the same code, so I didn’t think about how to change the code itself, but only about what structures to change, like List to obynchny [].
Unfortunately in Vala does not work unowned inside foreach: Invalid assignment from owned expression to unowned variable. So I just changed it to for, now its 2.3 seconds!