ffi-overhead
ffi-overhead copied to clipboard
update v
debug build is slow
And also, if we want to check ffi overhead, I think we need to update v file to
#flag ./newplus/plus.o
#include "./newplus/plus.h"
instead of
#include "newplus/plus.c"
my change result in 0ms
my change result in 0ms
That sounds a little too fast. Is V optimizing away the for x < count { x = C.plusone(x) }
loop? Could you double check the generated code with the prod
flag?
And also, if we want to check ffi overhead, I think we need to update v file to ... instead of ...
I'm not understanding why, mind schooling me on this one?
Thanks in advance, @ken0x0a.
@minond As I understand correctly, this repo is about ffi overhead.
By using #include "newplus/plus.c"
there should "not" be any overhead as ".v" file is translated into ".c" and compiled after that.
If I change v file to
#flag ./newplus/plus.o
#include "./newplus/plus.h"
instead of
#include "newplus/plus.c"
then, I got same overhead with "C".
And also, I forgot to mention that I don't understand (can't write) "C".
@ken0x0a I would keep this open as it is still unsolved. WDYT?
@dumblob That's true.
Good to use -prod
. That's fair.
And also think, the results on the README file will change a lot if we use LTO.
@minond Can you merge this?
@minond Can you merge this?
@ken0x0a I don't have merging privileges for this repo, I'd ping @dyu.