V version:
$ ./v version
V 0.1.28 b58b159
OS:
$ uname -a
Linux ubuntu 5.3.0-61-generic #55-Ubuntu SMP Fri Jun 19 11:16:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
What did you do?
$ time ./v examples/hello_world.v
real 0m0.612s
What did you expect to see?
$ cat foo.c
#include <stdio.h>
void main(void) {
printf("hello world\n");
}
$ time gcc -o foo foo.c
real 0m0.033s
What did you see instead?
Is the 612ms compile time expected for the vlang hello world example?
I tried my own plain C hello world example and it only took 33ms... so nearly 20x faster. Or what am I doing wrong?
I saw this [1] as well, which seems quite a bit faster at 443ms but still not that fast, or? And mysteriously took only 177ms at the start of this year!
What type of compile times should I be expecting for a hello world program?
To put things into perspective, a Perl one-liner takes 2ms:
$ time perl -e 'printf qq[hello world\n]'
hello world
real 0m0.002s
Disclaimer: I'm a vlang newbie! :-)
the problem is we can just create an simple hello world C file, because we have modules which are included like the builtin module. For a simple hello world in V it's 9000 lines in C, but this will change maybe in future
Modules aren't cached right now. They will be soon.
Yeah, that鈥檚 what I鈥檓 working on right now.
Thanks for the replies! Is there a ticket I can watch, or associate with this ticket, to be notified when the feature is ready?
@simonhf You can join the discord server which is given in the README.md of this repo.
Had trouble finding the link in the README.md file or any other file referencing Discord, but Googling helped me find vlang on Discord and this [1] is the direct link to the #working-on-right-now section on vlang Discord, in case anybody else is interested in following along.
[1] https://discordapp.com/channels/592103645835821068/712739618788868236/732629803190190101
Under the large button for github on the home page are a line of icons which are links to various social media. The left-most is a twitter icon, the 2nd from the left is for Discord.
Ahh, thanks... I initially just searched the text on the page for 'discord' but that didn't match the icon... mystery solved! :-)
Yeah... unless you recognize the icons immediately, you have to hover the mouse to see what they are. Not the best UI, but it seems to work most of the time.
Yeah, thanks... I'm also a newbie to Discord so I didn't know what I was looking for :-)
Most helpful comment
Modules aren't cached right now. They will be soon.