4 ms·
The problem with V is the habit of intellectual dishonesty surrounding it. Take this chart, showing the selling point of "fast compilation times":
by gridlockd 6y ago
The problem with V is the habit of intellectual dishonesty surrounding it.
Take this chart, showing the selling point of "fast compilation times":
Space required Build time
Go 525 MB 1m 33s
Rust 30 GB 45m
GCC 8 GB 50m
Clang 90 GB 60m
Swift 70 GB 90m
V < 2 MB <1s
All of these programs native compilers of complex languages, supporting multiple architectures. V is a frontend for a C compiler, which is likely GCC or Clang. It doesn't even belong in the comparison.
The fact that building Clang/LLVM takes 90GB of disk space is of course a sign of the impending collapse of human civilization, but I digress.
- rkeene2 6y agoI'm not sure where they got that number, but my LLVM 8.0.0 install (relatively complete, including Clang, etc) is 1.7GiB.
- delian66 6y agoSee for example: https://news.ycombinator.com/item?id=23139396 https://news.ycombinator.com/item?id=23139396
- akrymski 6y agoAccording to the website, V seems to have two backends: C and x86 - so it's not just a frontend to GCC. Unless I'm mistaken?
- delian66 6y agoThere is a native backend, that compiles directly to elf binaries on linux without using a C compiler, but it is still wip (and can not yet be used to selfcompile V itself for example). For example: 0[20:45:04] /v/nv LINUX $ ./v -x64 examples/hello_world.v use `v -x64 -v ...` to print resulting asembly/machine code code_start_pos = 78 x64 elf binary has been successfully generated 0[20:45:08] /v/nv LINUX $ ls -lart examples/hello_world -rwxrwxr-x 1 delian delian 188 сеп 15 20:45 examples/hello_world 0[20:45:17] /v/nv LINUX $ examples/hello_world Hello, World! 0[20:45:21] /v/nv LINUX $ ... and yes - the generated executable is 188 bytes long...
- delian66 6y agoV can use any C99 compiler as its backend, including tcc, clang, gcc or msvc. It really does recompiles itself very fast - on a i3-3225, using tcc it self compiles for ~0.6s . You can clone the repo, type `make` in it, then do `time ./v -show-timings self` and see for yourself - it will take you less than a minute (including cloning and the initial make which also clones from another C repository v.c, then compiles it to bootstrap v).