borealis icon indicating copy to clipboard operation
borealis copied to clipboard

Iterating first million numbers takes too long

Open aloussase opened this issue 1 year ago • 0 comments

This snippet of code:

while (i < 1000000) {
    i = i + 1;
}

Takes 6 seconds to run, as seen in the following screenshot: image

In contrast, the equivalent Python3 code takes about 100ms. image

Is there any way to optimize this?

aloussase avatar Sep 15 '23 03:09 aloussase