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

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.

主站蜘蛛池模板: 武穴市| 土默特右旗| 大洼县| 县级市| 应用必备| 和政县| 达日县| 沅江市| 东阳市| 津南区| 德保县| 尉氏县| 北票市| 西林县| 伊春市| 博乐市| 祁门县| 合作市| 金华市| 台东县| 大厂| 建德市| 额济纳旗| 辉县市| 马龙县| 繁峙县| 新宁县| 灵台县| 灯塔市| 梁平县| 江川县| 榆林市| 苏尼特右旗| 藁城市| 克什克腾旗| 沁水县| 金乡县| 中方县| 麻城市| 昌邑市| 明水县|