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
generally, bounds-checking can be more useful during debug than release. This varies per-application I'm sure.
I recently ported NES emulator from pure JavaScript to AssemblyScript and saw 2-3x worse performance. Under advice from the Discord, I then converted all the TypedArray to StaticArrays and put unchecked() around all the accesses, and that alone dropped me to nearly 1:1 performance with the JS original.
That's great and all, but unchecked() is ungainly and if I wanted the debug version to be bounds-checked, I'd need to take it out manually.
It would be nice if there were a compile-time option either to:
a) Disable/enable array bounds-checking altogether,
or
b) Disable/enable unchecked() from actually doing things. That way, we could disable it on compile for debug builds. Note: I do not advocate making debug AUTOMATICALLY do this, because you can do profiling in debug mode that you can't without it.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!
generally, bounds-checking can be more useful during debug than release. This varies per-application I'm sure.
I recently ported NES emulator from pure JavaScript to AssemblyScript and saw 2-3x worse performance. Under advice from the Discord, I then converted all the TypedArray to StaticArrays and put unchecked() around all the accesses, and that alone dropped me to nearly 1:1 performance with the JS original.
That's great and all, but unchecked() is ungainly and if I wanted the debug version to be bounds-checked, I'd need to take it out manually.
It would be nice if there were a compile-time option either to:
a) Disable/enable array bounds-checking altogether,
or
b) Disable/enable unchecked() from actually doing things. That way, we could disable it on compile for debug builds. Note: I do not advocate making debug AUTOMATICALLY do this, because you can do profiling in debug mode that you can't without it.
The text was updated successfully, but these errors were encountered: