You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In V, the type int is an 32bits number on every plateform. What is the point ?
Doing this you risk to suffer bad performance on some architecture (or at least not using some optimization).
If the user really need 32 bits, il will use the type i32/u32.
Il you are afraid of random integeroverflow on some plateforme (tested on a 64 bits CPU, runned on a 32 bits CPU), I guess you could add a compiler option to force the 32bits size int. Or force this behaviour only when running the test.
You could also consider adding type safe_int to fix this issue.
The text was updated successfully, but these errors were encountered:
I got you're point but in most programme, for i := 0; i < 10; i++ {
will be one of the main usage of integer (after storage), It' a shame to not optimize this usage case.
But you're right a trade off is necessary. It's all about what's your top priority.
Hello
In V, the type int is an 32bits number on every plateform. What is the point ?
Doing this you risk to suffer bad performance on some architecture (or at least not using some optimization).
If the user really need 32 bits, il will use the type i32/u32.
Il you are afraid of random integeroverflow on some plateforme (tested on a 64 bits CPU, runned on a 32 bits CPU), I guess you could add a compiler option to force the 32bits size int. Or force this behaviour only when running the test.
You could also consider adding type safe_int to fix this issue.
The text was updated successfully, but these errors were encountered: