Add Run time result
Signed-off-by: Adrien Kara <adrien@iglou.eu>
This commit is contained in:
parent
2b876b4a52
commit
d430b3730f
64
README.md
64
README.md
|
@ -41,4 +41,66 @@ You can find all RAW result on [/doc/result](doc/result/)
|
|||
|-------------|------------------------------|-----------------------|:------:|
|
||||
| GCC-GO | gccgo main.go -o bench_gccgo | 0.170248385 sec | ✅ |
|
||||
| TinyGo | tinygo build -o bench_tinygo | 9986.216965017 sec | ❌ |
|
||||
| Official Go | go build -o bench_go -a | 1.568412597 sec | ✅ |
|
||||
| Official Go | go build -o bench_go -a | 1.568412597 sec | ✅ |
|
||||
|
||||
#### Run time
|
||||
|
||||
##### Local test
|
||||
For this part, whe see 'internal bench' for checking 4 hard cases, all case are tested multiple times.
|
||||
|
||||
Time counting is done with this code:
|
||||
```
|
||||
type intime struct {
|
||||
start time.Time
|
||||
stop time.Time
|
||||
duration time.Duration
|
||||
}
|
||||
|
||||
func (i *intime) Start() {
|
||||
i.start = time.Now()
|
||||
}
|
||||
|
||||
func (i *intime) Stop() {
|
||||
i.stop = time.Now()
|
||||
i.duration = i.stop.Sub(i.start)
|
||||
}
|
||||
```
|
||||
###### [Math] Prime number search
|
||||
|
||||
| Compiler | Time | Status |
|
||||
|-------------|---------------|:------:|
|
||||
| GCC-GO | 632.843018 ms | ❌ |
|
||||
| TinyGo | 399.317119 ms | ✅ |
|
||||
| Official Go | 509.82006 ms | ❌ |
|
||||
|
||||
###### [Map] A very big map
|
||||
|
||||
| Compiler | Time | Status |
|
||||
|-------------|-------------------------|:------:|
|
||||
| GCC-GO | 406.668759 ms | ✅ |
|
||||
| TinyGo | **2h 42m 55.416901711 sec** | ❌ |
|
||||
| Official Go | 303.527414 ms | ✅ |
|
||||
|
||||
###### [Str] string concatenation
|
||||
|
||||
| Compiler | Time | Status |
|
||||
|-------------|---------------------|:------:|
|
||||
| GCC-GO | 2.944123142 sec | ✅ |
|
||||
| TinyGo | **3m 29.684675044 sec** | ❌ |
|
||||
| Official Go | 4.221176024 sec | ✅ |
|
||||
|
||||
###### [Loop] Loop managing
|
||||
|
||||
| Compiler | Time | Status |
|
||||
|-------------|-----------------|:------:|
|
||||
| GCC-GO | 9.281379494 sec | ❌ |
|
||||
| TinyGo | 457.010533 ms | ✅ |
|
||||
| Official Go | 3.519736744 sec | ❌ |
|
||||
|
||||
##### Total execution time
|
||||
|
||||
| Compiler | Time | Status |
|
||||
|-------------|--------------------|:------:|
|
||||
| GCC-GO | 13.320942949 sec | ✅ |
|
||||
| ~~TinyGo~~ | 9986.216965017 ms | ❌ |
|
||||
| **Official Go** | 8.562514977 sec | ✅ |
|
Loading…
Reference in New Issue