There are still problem with performance, after some experiments i distilled it to next case:

Execution of

time math/sieve 1000000 >/dev/null

takes about 170 secs

Execution of modified math/sieve with commented print() takes only about 3 secs.

So there is a real problem of using syscalls which operates with filesystems. (because even print()/fprint() leads to kwrite() syscall)