HaxeFoundation / HaxeFoundation/haxe
[cpp] [hl] Slow performance of trace command
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
The following code runs significantly slower on HL and CPP compared to other targets:
```haxe
class TraceTest {
public static function main() {
var start = haxe.Timer.stamp();
for (i in 1...2000)
trace(i);
var duration = Math.round((haxe.Timer.stamp() - start)*100) / 100;
trace('Duration: $duration seconds.');
}
}
```
I tested Haxe 4RC5 on Windows 10, these are my results:
|Target|Duration|
|------|--------|
CPP| **18.73** secs
HL 1.10| **10.5** secs
PHP5| 0.88 secs
Java8| 0.85 secs
Node.js 10.16| 0.65 secs
C#| 0.51secs
PHP7| 0.51 secs
Neko2.2| 0.49 secs
Python3.7| 0.45 secs
Contributor guide
Assessment
This issue has not been assessed yet.