Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use raise_notrace instead of raise if ocaml version >= 4.02.0 #817

Open
UnixJunkie opened this issue Dec 12, 2017 · 3 comments
Open

use raise_notrace instead of raise if ocaml version >= 4.02.0 #817

UnixJunkie opened this issue Dec 12, 2017 · 3 comments
Assignees

Comments

@UnixJunkie
Copy link
Member

in case exceptions are used for control flow, we should use faster exception throwing
since the stack trace will never be needed

This is just a proposition. If other maintainers agree, this could be labelled an improvement
and beginner task.

I don't know if this has any benefit for the js_of_ocaml crowds.

@gasche
Copy link
Member

gasche commented Dec 12, 2017

Right now, any kind of exceptions is slow on Javascript, I believe. So I suspect that it would work better to just rewrite code to not use exceptions for control flow (I have already done large parts of it in #768 and siblings), and it is not that much work.

@UnixJunkie
Copy link
Member Author

It is maybe not that much work, but I disapprove the fact that idiomatic OCaml code should be rewritten because of the JS crowds.
One should never program anything serious in JS.

@UnixJunkie
Copy link
Member Author

The way forward would be via some preprocessing first.
Then, if alternative versions are contributed (which should not insert performance regressions for regular OCaml users), we could remove the preprocessing hack little by little.

@UnixJunkie UnixJunkie self-assigned this Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants