Wednesday, September 8, 2021

Egel interpreter runs twice as fast in VM

 Okay, so I ported the interpreter to Fedora 34 (arm64) in a virtual machine on the Air. Now the microbenchmark runs twice as fast than on native, 2.5 seconds.

I thought I might have messed up and the thing doesn't garbage collect, so tested that and: 

[marco@fedora debug]$ valgrind ./egel ../examples/million.eg 

==2653== Memcheck, a memory error detector

==2653== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.

==2653== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info

==2653== Command: ./egel ../examples/million.eg

==2653== 

500000500000

==2653== 

==2653== HEAP SUMMARY:

==2653==     in use at exit: 3,374 bytes in 4 blocks

==2653==   total heap usage: 40,051,242 allocs, 40,051,238 frees, 2,275,766,965 bytes allocated

==2653== 

==2653== LEAK SUMMARY:

==2653==    definitely lost: 0 bytes in 0 blocks

==2653==    indirectly lost: 0 bytes in 0 blocks

==2653==      possibly lost: 0 bytes in 0 blocks

==2653==    still reachable: 3,374 bytes in 4 blocks

==2653==         suppressed: 0 bytes in 0 blocks

==2653== Rerun with --leak-check=full to see details of leaked memory

==2653== 

==2653== For lists of detected and suppressed errors, rerun with: -s

==2653== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

So that isn't it. Maybe the VM thinks it's a uniprocessor.

No comments:

Post a Comment