3 ms·
Don't let the facts get between you and faint praise! Also: Common Lisp, Scheme, Erlang, SML, OCaml, Haskell, Lua, Prolog, and Java, and no doubt numerous othe
by silentbicycle 16y ago
Don't let the facts get between you and faint praise!
Also: Common Lisp, Scheme, Erlang, SML, OCaml, Haskell, Lua, Prolog, and Java, and no doubt numerous others.
For all of the above, many (if not most) implementations compile natively.
- aaronblohowiak 16y agoI didn't know about llvm-lua (an AOT compilation option for lua.) Neat!
- stcredzero 16y agoSomething which has been neglected, but which has clearly shown its value in VMs is the information gained by runtime tracing. We should make this more available to the programmer! It should be possible for a programmer to highlight a section of code in an IDE and choose "Apply Trace," whereupon the IDE will apply static type annotations based from saved runtime trace information. The IDE should be also able to present the same information as profiling data to let the programmer quickly home in on the 15% or so of the app which is most performance critical. Using techniques like this should let us get C-like speeds from many dynamic languages. (Admittedly, this sort of thing would also be highly dangerous. One couldn't apply such semi-automated annotations in ignorance. This could also break otherwise correct programs.)
- silentbicycle 16y agoDirecting programmers to hotspots based on programming info is pretty reliable. In your case, it depends on how confident the annotations are. The Self papers have a lot about that - JIT compilers can nonchalantly make riskier optimizations, because they can also easily undo them.
- stcredzero 16y agoMy idea is that the programmers can add expert knowledge and human intelligence into the mix. They have the ability to just let the VM know: "Okay, in this part these things are always going to be this type and things go like that, so just go to town and optimize the bejesus out of it!" In other words, a good programmer should be able to just let the VM know ahead of time what's up in critical sections of stable production code. Even better, we should be able to combine datasets from many different runs of many VM instances! This sort of technique would allow us very high degrees of confidence for things like web apps in server farms, where getting 10's of thousands of runtime tracing datasets would be easy to do. This is where a dynamic language with optional type annotations would really shine.
- xiongchiamiov 16y agoSounds like how some people use Cython. Snippet from [0], which is unfortunately temporarily down (I got to it through Google Cache[1]): cpdef double integrate_f(double a, double b, int N): cdef double dx, s cdef int i dx = (b-a)/N s = 0 for i in range(N): s += f(a+i*dx) return s * dx [0]: http://www.behnel.de/cython200910/talk.html http://www.behnel.de/cython200910/talk.html [1]: http://webcache.googleusercontent.com/search?q=cache:7NvoUHhaxRkJ:www.behnel.de/cython200910/talk.html&hl=en&strip=1 http://webcache.googleusercontent.com/search?q=cache:7NvoUHh...