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

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.

主站蜘蛛池模板: 崇阳县| 建阳市| 西盟| 纳雍县| 彝良县| 连云港市| 八宿县| 东台市| 仪陇县| 化德县| 宜城市| 镇宁| 方正县| 延川县| 财经| 石台县| 枣阳市| 田林县| 铜川市| 甘谷县| 黄陵县| 福泉市| 三原县| 临武县| 彭阳县| 洛浦县| 凤凰县| 包头市| 平顺县| 民和| 鄂温| 黄陵县| 阳谷县| 长顺县| 江源县| 登封市| 白河县| 平潭县| 隆安县| 会泽县| 兴化市|