Comments (14)
Is this for source and libraries? I feel libraries need their existing flags (i.e. native
) for consistent performance.
from objeck-lang.
I will look into this for the next release. This is more of a runtime vs. compiler issue. The compiler may link libraries that use the native
keyword. If so, the JIT compiler must be disabled within the VM. I am also concerned with overall performance.
from objeck-lang.
I will look into this for the next release. This is more of a runtime vs. compiler issue. The compiler may link libraries that use the
native
keyword. If so, the JIT compiler must be disabled within the VM. I am also concerned with overall performance.
Don't think too much. It's source-level and only affects the source files being compiled. There is nothing to do with the runtime. When I proposed this, I didn't think you would think that far. My opinion is that everything should be JIT-ed. The keyword native
sounds redundant to me. I am afraid to tell this straight to you. I only want my usage of Objeck to be easier, but I don't want to clash with you, so I made this suggestion.
from objeck-lang.
No impact on the source programmer's source code. The idea is to empower the programmer to let them decide to want they want JIT compiled in their code. On the otherhand, JIT compiling everything is efficient.
from objeck-lang.
No impact on the source programmer's source code. The idea is to empower the programmer to let them decide to want they want JIT compiled in their code. On the otherhand, JIT compiling everything is efficient.
I don't get this idea. We disagreed with each other again. Btw, this suggestion is about a compiler switch, not about forcing JIT by default with no options to customize. It's just a shortcut to make the programmer's life easier so he doesn't have to write native
everywhere. His ability to customize everything is not affected, just don't use the compiler switch.
from objeck-lang.
So, the programmer should not use the native
keyword. What am I missing? Are you asking for a compiler switch to override the programmer's use of the keyword native
? This is not about disagreement, as I am trying to understand your request.
from objeck-lang.
So, the programmer should not use the
native
keyword. What am I missing? Are you asking for a compiler switch to disable the programmer's use of the keywordnative
?
Regardless of the source code use native
or not, a compiler switch will force native
so everything be JIT-ed (this issue, #387). My main usage for this is that I don't have to write native
everywhere. Issue #388 is the reverse of this, as it will force everything to be not JIT-ed.
from objeck-lang.
Thanks, I will look into it. However, performance may suffer. Not all code needs to be JIT compiled. The compiler optimizes all code, rather JIT compiler or not. At runtime, the JIT compiler flag is honored.
Do you have metrics, programs, or data that you can share for testing?
from objeck-lang.
Thanks, I will look into it. However, performance may suffer. Not all code needs to be JIT compiled. The compiler optimizes all code, rather JIT compiler or not. At runtime, the JIT compiler flag is honored.
Now it's me who struggles to understand what you are talking about. OK. I don't expect it to be that complicated. I'm not a professional programmer, and I tend to think the simple way. Java and C# offer no such control. I think they let the VM decide whether to JIT or not. Everything is fine. Why is it too complicated with Objeck?
from objeck-lang.
JIT comping all methods/functions has a runtime hit which is not justified in most cases. It is justified if the methods/functions are computationally intensive and are called multiple times within the code.
Simple calls like getters/setters are optimized to avoid function/method calls, and more aggressive inlining is done after that.
Please send me a code sample so that I can test and benchmark your request. Implementing your request is easy, but I worry about side effects.
Refer: https://en.wikipedia.org/wiki/Just-in-time_compilation
from objeck-lang.
Please close this issue and remove it from the roadmap. I don't need this feature anymore. Thank you.
from objeck-lang.
Okay, thank you for the feedback.
For reference, this is the optimization pipeline.
Optimizations in list order:
- Jump optimizations
- Constant folding
- Getter/Setting inlining
- Dead store removal
- Constant propagation
- Method inlining
- Strength reduction
- Instruction optimization
Additionally, at runtime, bytecode may be translated to machine code at the programmer's request.
from objeck-lang.
Additionally, at runtime, bytecode may be translated to machine code at the programmer's request.
Isn't this AOT?
from objeck-lang.
Additionally, at runtime, bytecode may be translated to machine code at the programmer's request.
Isn't this AOT?
No, that is compiling bytecode into machine code before runtime vs. at runtime.
from objeck-lang.
Related Issues (20)
- Data Type Formatting Options HOT 3
- Bitwise NOT HOT 7
- Strings to be UTF-16 on all platforms? HOT 3
- Garbage Collector Deadlock HOT 1
- Can I change the directory structure of the Objeck distribution? HOT 1
- MSYS2 package for Objeck
- FreeBSD support HOT 1
- OpenBSD support HOT 1
- NetBSD support HOT 1
- HaikuOS support HOT 1
- OpenIndiana support HOT 1
- Android support HOT 1
- iOS/iPadOS support HOT 1
- Support musl-based Linux HOT 1
- Support legacy MSVCRT-based MinGW HOT 3
- Support ReactOS HOT 1
- Support Windows ARM HOT 2
- Optimized builds HOT 5
- Bug in code for Collections 'Filter' methods HOT 1
- Primitive support for '<' and '>' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from objeck-lang.