Samsung / walrus

WebAssembly Lightweight RUntime
Apache License 2.0
39 stars 10 forks source link

Implement RSA benchmark-test #191

Closed GorogPeter closed 10 months ago

GorogPeter commented 10 months ago

In my code, I used commented asserts to specify the inputs. In my humble opinion, it (e.g. // assert(prime1 > 255);) looks better than a text one (e.g. // prime1 has to be greater than 255). Is it okay, or should I change it?

Moreover, in some cases, I preferred to use if and while statements that contain a short, single and simple instruction, without brackets. For me, it looks more readable and more straightforward than with them. Is it okay, or should I change it?

For example, this:

if (e == 0) return 1;
x = x % m;
if (e == 1) return x;
if (x <= 1) return x;

instead of this:

if (e == 0) {
    return 1;
}
x = x % m;
if (e == 1) {
    return x;
}
if (x <= 1) {
    return x;
}