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

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.

主站蜘蛛池模板: 上饶县| 昌邑市| 东安县| 沙洋县| 六盘水市| 汤原县| 贡山| 遂宁市| 神木县| 昌吉市| 乌鲁木齐县| 新泰市| 招远市| 婺源县| 平陆县| 房产| 会宁县| 福泉市| 吉水县| 盖州市| 清涧县| 龙岩市| 渝中区| 响水县| 大名县| 噶尔县| 栖霞市| 金阳县| 河北区| 沂水县| 安岳县| 辽阳县| 高淳县| 垫江县| 卓尼县| 手机| 杭锦后旗| 定州市| 武安市| 龙胜| 辛集市|