vlang / website

MIT License
62 stars 96 forks source link

Lines of code per second #238

Open todor2810 opened 1 year ago

todor2810 commented 1 year ago

On the front page (https://vlang.io/) it says:

V compiles ≈110k (Clang backend) lines of code per second (Intel i5-7500, SM0256L SSD, no optimization)

However when I try to reproduce this I get ≈40k LOC/s (i.e. ≈25s in total). Steps I made:

System info:

Would it be a good idea to change the phrasing to:

V compiles up to ≈110k (Clang backend) lines of code per second

medvednikov commented 1 year ago

Did you do a release build of V with -prod?

todor2810 commented 1 year ago

I didn't. I just ran:

v -prod self

followed by the previous steps. The compilation speed for result.v increased from ~40k LOC/s to ~45k LOC/s (~22s in total).

MatejMagat305 commented 1 year ago

well I know I have "beast" pc

OS: linux, Kali GNU/Linux Rolling
Processor: 32 cpus, 64bit, little endian, AMD Ryzen 9 5950X 16-Core Processor
CC version: cc (Debian 12.2.0-13) 12.2.0

getwd: /home/matejmag/Documents/v/examples/focus
vmodules: /home/matejmag/.vmodules
vroot: /home/matejmag/Documents/v
vexe: /home/matejmag/Documents/v/v
vexe mtime: 2023-01-28 16:17:14
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.2 1d4fd53.d3e4058

Git version: git version 2.39.0
Git vroot status: weekly.2023.04-18-gd3e4058a
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3

almost 4 GZ, but I have with "v self -prod"

real    1.69s
user    1.48s
sys     0.24s
cpu     102%

that means almost 591716 line / s (591K LOC / s)

medvednikov commented 1 year ago

Cool @MatejMagat305

That's on par with the website's 500k loc/s with the tcc backend.

medvednikov commented 1 year ago

@tedstoychev the hardware listed on the website is a bit more modern, hence the 2x speed diff.