mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: fix typos (#19693)
This commit is contained in:
parent
ac40981bcc
commit
690ec7d3a5
43 changed files with 159 additions and 150 deletions
|
@ -1,10 +1,12 @@
|
|||
Running the C# program:
|
||||
====================================
|
||||
|
||||
```
|
||||
dotnet run
|
||||
```
|
||||
|
||||
Creating a release version of the C# program:
|
||||
|
||||
```
|
||||
dotnet publish -c Release -r ubuntu.20.04-x64
|
||||
```
|
||||
|
@ -16,49 +18,52 @@ but unfortunately it also stops running after stripping :-| .
|
|||
|
||||
Compiling and running the V program:
|
||||
====================================
|
||||
|
||||
```
|
||||
v crun vectors.v
|
||||
```
|
||||
... produces and runs an executable `vectors` which is ~1.3MB in size.
|
||||
|
||||
... produces and runs a `vectors` executable which is ~1.3MB in size.
|
||||
|
||||
Compiling and running the V program, compiled with -prod:
|
||||
|
||||
```
|
||||
v -prod crun vectors.v
|
||||
```
|
||||
... produces and runs an executable `vectors` which is ~176KB in size.
|
||||
|
||||
... produces and runs a `vectors` executable which is ~176KB in size.
|
||||
After stripping, the executable shrinks to 157KB. It can still run after
|
||||
stripping.
|
||||
|
||||
|
||||
Note: using `crun` will make sure that the compilation will happen just
|
||||
once at the start, and then the executable will be just reused by the
|
||||
subsequent commands with identical options. It will also ensure that
|
||||
the compiled executable will not be removed, unlike `run` .
|
||||
|
||||
|
||||
Some measurements and comparisons
|
||||
====================================
|
||||
Note: the folowing was done on Intel(R) Core(TM) i3-3225, 16GB RAM:
|
||||
|
||||
Note: the following was done on Intel(R) Core(TM) i3-3225, 16GB RAM:
|
||||
|
||||
```
|
||||
#0 13:41:35 ᛋ master /v/vnew/bench/vectors❱rm -rf vectors
|
||||
#0 13:41:49 ᛋ master /v/vnew/bench/vectors❱
|
||||
#0 13:41:49 ᛋ master /v/vnew/bench/vectors❱v -o vectors_development vectors.v
|
||||
#0 13:42:14 ᛋ master /v/vnew/bench/vectors❱v -o vectors_production -prod vectors.v
|
||||
#0 13:41:49 ᛋ master /v/vnew/bench/vectors❱v -o vectors_development vectors.v
|
||||
#0 13:42:14 ᛋ master /v/vnew/bench/vectors❱v -o vectors_production -prod vectors.v
|
||||
#0 13:42:28 ᛋ master /v/vnew/bench/vectors❱
|
||||
#0 13:42:29 ᛋ master /v/vnew/bench/vectors❱hyperfine ./bin/Release/net7.0/ubuntu.20.04-x64/publish/vectors ./vectors_development ./vectors_production
|
||||
Benchmark 1: ./bin/Release/net7.0/ubuntu.20.04-x64/publish/vectors
|
||||
Time (mean ± σ): 347.4 ms ± 7.4 ms [User: 334.4 ms, System: 13.0 ms]
|
||||
Range (min … max): 340.2 ms … 361.7 ms 10 runs
|
||||
|
||||
|
||||
Benchmark 2: ./vectors_development
|
||||
Time (mean ± σ): 882.6 ms ± 14.0 ms [User: 880.3 ms, System: 2.3 ms]
|
||||
Range (min … max): 862.4 ms … 912.9 ms 10 runs
|
||||
|
||||
|
||||
Benchmark 3: ./vectors_production
|
||||
Time (mean ± σ): 217.9 ms ± 9.4 ms [User: 216.8 ms, System: 0.9 ms]
|
||||
Range (min … max): 206.4 ms … 241.3 ms 12 runs
|
||||
|
||||
|
||||
Summary
|
||||
./vectors_production ran
|
||||
1.59 ± 0.08 times faster than ./bin/Release/net7.0/ubuntu.20.04-x64/publish/vectors
|
||||
|
@ -69,8 +74,8 @@ Summary
|
|||
-rwxrwxr-x 1 1000 1000 1320764 Sep 6 13:42 ./vectors_development
|
||||
-rwxr-xr-x 1 1000 1000 66732821 Sep 6 13:40 ./bin/Release/net7.0/ubuntu.20.04-x64/publish/vectors
|
||||
#0 13:45:12 ᛋ master /v/vnew/bench/vectors❱
|
||||
#0 13:53:12 ᛋ master /v/vnew/bench/vectors❱alias xtime='/usr/bin/time -f "CPU: %Us\tReal: %es\tElapsed: %E\tRAM: %MKB\t%C"'
|
||||
#0 13:53:42 ᛋ master /v/vnew/bench/vectors❱xtime ./vectors_development
|
||||
#0 13:53:12 ᛋ master /v/vnew/bench/vectors❱alias xtime='/usr/bin/time -f "CPU: %Us\tReal: %es\tElapsed: %E\tRAM: %MKB\t%C"'
|
||||
#0 13:53:42 ᛋ master /v/vnew/bench/vectors❱xtime ./vectors_development
|
||||
5.0498380931718074e+07 - 5.0504723697762154e+07 - 5.040198063489048e+07
|
||||
0.0 - 0.0 - 0.0
|
||||
CPU: 0.87s Real: 0.87s Elapsed: 0:00.87 RAM: 4404KB ./vectors_development
|
||||
|
@ -84,10 +89,10 @@ CPU: 0.20s Real: 0.20s Elapsed: 0:00.20 RAM: 3228KB ./vector
|
|||
CPU: 0.33s Real: 0.34s Elapsed: 0:00.34 RAM: 30544KB ./bin/Release/net7.0/ubuntu.20.04-x64/publish/vectors
|
||||
#0 13:54:02 ᛋ master /v/vnew/bench/vectors❱
|
||||
#0 14:01:33 ᛋ master /v/vnew/bench/vectors❱
|
||||
#0 14:01:35 ᛋ master /v/vnew/bench/vectors❱xtime v vectors.v
|
||||
#0 14:01:35 ᛋ master /v/vnew/bench/vectors❱xtime v vectors.v
|
||||
CPU: 0.41s Real: 0.36s Elapsed: 0:00.36 RAM: 59412KB v vectors.v
|
||||
#0 14:01:41 ᛋ master /v/vnew/bench/vectors❱
|
||||
#0 14:01:42 ᛋ master /v/vnew/bench/vectors❱xtime v -prod vectors.v
|
||||
#0 14:01:42 ᛋ master /v/vnew/bench/vectors❱xtime v -prod vectors.v
|
||||
CPU: 4.97s Real: 5.11s Elapsed: 0:05.11 RAM: 80732KB v -prod vectors.v
|
||||
#0 14:01:48 ᛋ master /v/vnew/bench/vectors❱
|
||||
#0 14:01:50 ᛋ master /v/vnew/bench/vectors❱xtime dotnet publish -c Release -r ubuntu.20.04-x64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue