Wednesday, July 30, 2014

Lambdas in Java 8 Aren't Just Inner Classes

I've been watching quite a few instruction videos lately. One of my favorites is about how lambdas are implemented in the JVM. One would think they simply implemented lambdas as inner classes but they didn't. They used a the fancy invoke dynamic instruction to get more performance out of it. invoke dynamic is incredibly powerful. It's actually a JVM instruction that runs a custom method to figure out how to resolve the method call then caches it if the custom code says it's possible.

Check it out: Lambdas under the hood

For those whose eyeballs are allergic to video there's also this document which does a good job of explaining things too: Translation of Lambda Expressions

1 comment:

cpvhw3ibfp said...

The last paperwork would even be tremendously decreased outcome of} lack of materials required to build the circuit board. Complex designs which may takes weeks to complete through regular processing may be 3D printed, tremendously Vacuum cleaners decreasing manufacturing time. If you’ve obtained a group of budding architecture students, problem them to design their very own buildings in the Speedy Architect Project! Appropriate for college kids|for college students} in grades through three through eight, the lesson teaches them method to|tips on how to} create buildings that meet crucial design standards. It solely takes a couple class intervals for college kids|for college students} to plan their designs, create their fashions on Tinkercad, and 3D print their constructions.