Regarding question 1, yeah, print/log is really very slow, in the worse of cases is calling one write() syscall per line.
For inscance mwemu emualtes ASM at 18,000,000 instructions/second but logging every emulated instruction the speed drops to 408,000 approx.
There are better ways to do this but in this case is triggering 1 linux write() syscall for every log!!!
check it with strace, example:
strace -f -e write cargo run -- -f test/elf64lin_syscall64.bin -6 -vv
write(2, "\33[1;33m13282 0x401046: jmp sho"..., 5713282 0x401046: jmp short 000000000040103Ch
) = 57
write(2, "\33[1;36m13283 0x40103c: mov eax"..., 4113283 0x40103c: mov eax,22h
) = 41
write(2, "\33[0;32m13284 0x401041: xor rdi"..., 4113284 0x401041: xor rdi,rdi
) = 41
write(2, "\33[0;31m13285 0x401044: syscall\33["..., 3513285 0x401044: syscall
) = 35
write(2, "\33[1;31m** interrupt 0x80 functio"..., 45** interrupt 0x80 function:pause
) = 45
write(2, "\33[1;33m13286 0x401046: jmp sho"..., 5713286 0x401046: jmp short 000000000040103Ch
) = 57
write(2, "\33[1;36m13287 0x40103c: mov eax"..., 4113287 0x40103c: mov eax,22h
) = 41
write(2, "\33[0;32m13288 0x401041: xor rdi"..., 4113288 0x401041: xor rdi,rdi
) = 41
write(2, "\33[0;31m13289 0x401044: syscall\33["..., 3513289 0x401044: syscall
) = 35
write(2, "\33[1;31m** interrupt 0x80 functio"..., 45** interrupt 0x80 function:pause
) = 45
write(2, "\33[1;33m13290 0x401046: jmp sho"..., 5713290 0x401046: jmp short 000000000040103Ch
) = 57
write(2, "\33[1;36m13291 0x40103c: mov eax"..., 4113291 0x40103c: mov eax,22h
) = 41
write(2, "\33[0;32m13292 0x401041: xor rdi"..., 4113292 0x401041: xor rdi,rdi
) = 41
write(2, "\33[0;31m13293 0x401044: syscall\33["..., 3513293 0x401044: syscall
) = 35
write(2, "\33[1;31m** interrupt 0x80 functio"..., 45** interrupt 0x80 function:pause
) = 45
write(2, "\33[1;33m13294 0x401046: jmp sho"..., 5713294 0x401046: jmp short 000000000040103Ch
) = 57
write(2, "\33[1;36m13295 0x40103c: mov eax"..., 4113295 0x40103c: mov eax,22h
) = 41
write(2, "\33[0;32m13296 0x401041: xor rdi"..., 4113296 0x401041: xor rdi,rdi
) = 41
write(2, "\33[0;31m13297 0x401044: syscall\33["..., 3513297 0x401044: syscall
) = 35
write(2, "\33[1;31m** interrupt 0x80 functio"..., 45** interrupt 0x80 function:pause
) = 45
write(2, "\33[1;33m13298 0x401046: jmp sho"..., 5713298 0x401046: jmp short 000000000040103Ch
) = 57
write(2, "\33[1;36m13299 0x40103c: mov eax"..., 4113299 0x40103c: mov eax,22h
) = 41
write(2, "\33[0;32m13300 0x401041: xor rdi"..., 4113300 0x401041: xor rdi,rdi
) = 41
write(2, "\33[0;31m13301 0x401044: syscall\33["..., 3513301 0x401044: syscall
) = 35
write(2, "\33[1;31m** interrupt 0x80 functio"..., 45** interrupt 0x80 function:pause
) = 45
^C--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
strace: Process 1059038 detached
regards.