switch式の結果javapしたらhttps://t.co/xMc0YEYsrg java.lang.runtime.SwitchBootstraps と tableswitch が使われることに気がついたが、これ巨大なswitch式をJDK 21以降で書いた場合、同等の巨大なmatch式をScalaで書くよりも速度が速い可能性があるのでは??? これScalaで活用できるか?というと— Kenji Yoshida (@xuwei_k) September 25, 2023 switch式の結果javapしたら https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/runtime/SwitchBootstraps.html java.lang.runtime.SwitchBootstraps と ta
Red Hat のソリューションアーキテクトの瀬戸です。 この記事はRed Hat Developerのブログ記事、What's new for developers in JDK 21 | Red Hat Developer を、許可をうけて翻訳したものです。 Java開発者にとってエキサイティングな情報として、今年 9 月 19 日に JDK 21 がリリースされました。 このリリースには、仮想スレッド(Virtual Thread)、レコードパターン(Record Patterns)、順序付コレクション(Sequenced Collections)など、Javaのエコシステムに利益をもたらす多くの新機能が含まれています。JDK 21 のプレビューには、文字列テンプレート(String Templates)、スコープ付値(Scoped Values)、構造化並列処理(Structure
Javaは、企業のITシステムの開発になくてはならないプログラミング言語としての地位を確立している。一方で、PythonやJavaScriptといった若い世代に人気がある言語と比較すると、煩雑な記法が多く堅苦しいイメージは否めない。 こうしたイメージを一新してJavaの生産性を高める試みが「Project Amber(プロジェクト・アンバー)」だ。同プロジェクトではこれまで、Javaプログラムの可読性を高めるために数々の記法の改良を行ってきた。 その成果の1つとして、2023年秋に公開予定の「JDK(Java Development Kit) 21」に導入されるのが、Javaプログラムの実行の起点である「mainメソッド」の大幅な簡略化だ。Javaの新機能は「JEP(JDK拡張提案)」として管理されており、mainメソッドの簡略化は「JEP 445」で規定されている。 Javaの開発にかか
こういう記事を読んだ。 transparent-to-radiation.blogspot.com なんかScalaのメモリ使用量が異常に多いなと思って、調べた。検証コードもアップした。 github.com 検証として、様々なJVM(OpenJDKとかCorettoとか)とそのバージョン(8, 11, 17)でJARを実行して考察した。JVMを用意するためにASDFを使った。また、ASDFから引っぱってこれないJVMのバージョン(OpenJDKの8など)は省略している。 JAVA_OPTSは-Xms100M -Xmx2Gである。 手元のマシン(Linux x86_64 Xeon W-10855M 2.80GHz 64GiB RAM)でのrun-matrix.shの実行結果は、以下の通り(各列は、JVM、計算件数、実行時間Sec、メモリ総使用量KiB)。 openjdk-11 openjd
Spring Boot で作成したアプリケーションをコンテナ化する際、jlink コマンドを利用してカスタム JRE を作成し、軽量なベース・イメージを利用する事で、349MB から 105MB と大幅にコンテナのイメージ・サイズを削減する事ができます。今回はその方法を詳細に紹介します。 作成方法の手順 サンプルプロジェクトの作成 Spring Starter を利用してサンプルのプロジェクトを作成します。 Create Spring Boot App サンプル RESTful エンドポイントの作成 HelloController.java ファイルを作成し下記を実装します。 import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.Re
イマドキの現場で使えるJavaライブラリ事情 from takezoe こちらのスライドを読んでいて気になったので JGit でちょっとサンプルを書いてみました。 http://www.eclipse.org/jgit/ http://jgit.info/javadoc/ 何かいいアイデアが思いついたら JGit を使った何かをつくってみたい気になりました。 build.sbt // http://www.eclipse.org/jgit/download/ resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven" libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "[2.1,)" sample.scala import org.e
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く