Why my node.js C++ addons so slow after running?

https://github.com/XadillaX/thmclrx/tree/fb1fc3e69c8fa7dac7037ba86e923ce0c8da9ab1/src

This is my C++ addons.

https://github.com/XadillaX/thmclrx/blob/fb1fc3e69c8fa7dac7037ba86e923ce0c8da9ab1/test/test.js

And above is the tester code.

SLOW, I mean not running but after running.

console.log can be done quickly but there's a long time before process quit.

For example:

for(var i = 0; i < 35500; i++) {
    rgb.push({
        r   : Number.random(0, 255),
        g   : Number.random(0, 255),
        b   : Number.random(0, 255)
    });
}
var result = thmclrx.cpp.mindifferGet(rgb);
console.log(result);

Change 35500 to a small number, it will soon quit after running the addons. But if you change it to a large number, it will be a long time between console.log done and quiting.

console.log done means the program inside addons is done!

But why there's still such a long time before quit?!

SOS!