mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
371 B
21 lines
371 B
if (typeof print !== 'function') { print = console.log; }
|
|
|
|
function test() {
|
|
var msg = [];
|
|
while (msg.length < 10000) {
|
|
msg[msg.length] = Math.PI;
|
|
}
|
|
|
|
// print(Duktape.enc('hex', CBOR.encode(msg)));
|
|
|
|
for (var i = 0; i < 1e3; i++) {
|
|
void CBOR.encode(msg);
|
|
}
|
|
}
|
|
|
|
try {
|
|
test();
|
|
} catch (e) {
|
|
print(e.stack || e);
|
|
throw e;
|
|
}
|
|
|