-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Usage question #1
Comments
Well, the only reason to fail is if there is no memory (if heap or virtual allocation fails) or there is a bug in the JIT code generation. Normally, it shouldn't fail. I think that this is historical, I wrote MathPresso initially for comparison between evaluated code and executed code. In MPSL there is no "evaluation" mode, for example. |
Okay, thanks. I was intentionally sending in an expression with a syntax error to see how create() worked, and noticed that comment. My particular test was kicking out at the MPParser::parse() phase because I referenced an undefined variable. |
I think you will be excited after you see MPSL, it's much more advanced than MathPresso, but also takes more time to develop :) |
I am excited about it! Of course I realize that you have lots of other things that you're doing as well. By the way, what's your sense about the speed of separate statements vs a single one? For example, would you expect "z = x + y; z+ 7" to be a different speed than "x + y + 7"? |
It could be. MathPresso doesn't schedule the machine code generated, so if you reorder the expression a bit you can achieve better performance, but don't expect so much, it's unpredictable I think. Reordering is a task in asmjit I didn't finish yet, so this whole thing can be solved at a different layer without complicating MP itself. BTW yeah, a lot of things I'm working on. I'm not that skilled in compiler construction so MPSL takes a lot of time, but I would like to release MPSL even before Blend2D. |
Okay, thanks. Have you ever done any benchmarks comparing it to normally compiled code? |
this is very nice, I'm having loads of fun with it. I can only imagine how good MPSL will be! |
in mptest.cpp, I saw something like
and in mathpresso.cpp,
What might cause the JIT to fail? Is there some place in the interface where I can detect whether or not the JIT failed?
The text was updated successfully, but these errors were encountered: