2 ms·
> So you think scripting languages that have no type constraints will somehow advance to the point of being the same as writing native code? Absolutely. It's j
by vardump 11y ago
> So you think scripting languages that have no type constraints will somehow advance to the point of being the same as writing native code?
Absolutely. It's just a matter of time. Javascript JITters and LuaJIT are pretty good examples already. And there's so much more that can be done!
> maybe you know only scripting and dynamic languages and you want to believe that at some point a solution will come to you instead you having to learn programming at a lower level?
I do C/C++ (20+ years of experience). And a lot of other languages. Firmware and kernel driver development. 6502 (almost 30 years ago), 68k, x86 (+SSE/AVX/etc.), ARM (+NEON/etc)...
Sufficiently low level?
> I've seen the latter attitude in plenty of people.
There's a difference between where the buck is at right now and where it's going.
- deleted 11y ago[deleted]
- CyberDildonics 11y agoOk, but what evidence suggests this to you other than optimism? What I see is dynamic languages having more underpinnings of fast native code or things like web assembly, which make them effectively faster. I don't see any evidence that dynamic languages in general will somehow get much faster though.
- vardump 11y ago> Ok, but what evidence suggests this to you other than optimism? Intuition and optimism is a major part of it I guess. The fact that compilers have gotten increasingly clever over time. If current tracing JITs could handle branching in the trace instead of bailing out of any unexpected branch with a guard condition, we'd be closer to native performance. From data side, for example Google's V8 can infer hidden classes and member types, turn javascript object (read: hash) into a binary structure, akin to C struct. Well, one idea here: I envision profiling and tracing "superJITs" that can build a model of deterministic target code data flow (including target internal state), execution flow and computation. Not looking so much at the code itself at binary level, but analyzing the critical points that actually decide or compute something. Once the model is built, the "superJIT" will compute constraints for model validity and build AST out of it. Data flow is used to see through hash tables and other transformations and where predictable, used to build binary structs for transient and state data. Simplify and optimize. Vectorize where possible. Output executable binary. Cache to RAM and to disk. Limitations will of course be number of execution paths and too complicated data flow taints. Rarer execution paths could be pruned and special cased, and just generating fast code for the very likely paths. Is this particular idea realistic? Frankly, I have no idea. Do I think something similar will be built? Yes, but of course with constraints. The performance gap might never be completely removed, but incrementally narrowed. Perhaps eventually to few percent range. We'll see.