svaarala / duktape

Duktape - embeddable Javascript engine with a focus on portability and compact footprint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A possible performance problem of calling sort function with long array

ayuan0828 opened this issue · comments

Version: 2.7.0

Description:

When I run the following test case, I found that duktape is much slower than other js engines,such as quickjs or mujs. I want to know what causes such a big performance difference?

Testcase:

a = [];
a.length = 0xfffff;
a.sort();

Time of duktape:

24781ms

Time of quickjs:

72ms

Time of mujs:

166ms