the process ends with these stats:
TOP 10 Products by ID:
{ Id: 31229, numSold: 99999741 }
{ Id: 724109, numSold: 99999702 }
{ Id: 228470, numSold: 99999663 }
{ Id: 252501, numSold: 99999630 }
{ Id: 764570, numSold: 99999462 }
{ Id: 525615, numSold: 99999414 }
{ Id: 789503, numSold: 99999379 }
{ Id: 428851, numSold: 99999260 }
{ Id: 533397, numSold: 99999244 }
{ Id: 202426, numSold: 99999146 }
Max Quantity Item : id: 31229 Quantity: 99,999,741
Min Quantity Item: id: 691832 Quantity: 76
Process: 4547ms
is there any way to improve the performance from the V8 side?
I've tried the following line but makes no significant difference
./node --max_executable_size=3048 --stack_size=102400 test.js
./node --max_old_space_size=3048 --stack_size=102400 test.js
I coded the same in Java and
by modifying the arguments to the JVM (increase the memory)
JRE Arguments -> -Xms1024m -Xmx2048m
the performance was significant faster: for 1,000,000 elements-> Time: 1730 ms
Any advice/trick will be welcomed
Best Regards
Juan S.