官术网_书友最值得收藏!

Runs on JVM

Consider efficiency and optimization as factors for a language to be well performant. Scala utilizes JVM for this. JVM uses Just in Time (JIT) compilation, adaptive optimization techniques for improved performance. Running on JVM makes Scala interoperable with Java. You've multitudinous libraries available as tools for reuse.

If anywhere in your mind you're comparing Java and Scala's performance, let's get it clear. Both Java and Scala programs are compiled into bytecode. JVM understands bytecode and runs it for you. So it mostly depends on the way you write a program. Scala blends in some syntax sugar, compiler logic that can cause your program to be more/less performant than Java. Mix-ins using traits can be an asset to your program architecture but may affect your program's performance. But alternatives in Java may cost the same or more. So it is more about your core understanding of constructs and how your code is going to compile and perform. It takes some time and effort to understand so the choice is yours; as a smart programmer, you may go for a syntactically powerful language.

主站蜘蛛池模板: 登封市| 阜宁县| 会泽县| 寻甸| 吴忠市| 黄平县| 靖安县| 汤原县| 马山县| 临潭县| 孙吴县| 宁都县| 长白| 黑河市| 芦溪县| 三原县| 阿鲁科尔沁旗| 且末县| 徐汇区| 汝州市| 赫章县| 曲松县| 盖州市| 丹江口市| 隆化县| 翼城县| 龙口市| 宁陵县| 四会市| 射洪县| 三穗县| 项城市| 迁西县| 凌海市| 白水县| 凤凰县| 铁岭县| 五峰| 蕲春县| 资溪县| 家居|