LoginSignup
0
0

More than 3 years have passed since last update.

date変換時の生成時の速度比較

Last updated at Posted at 2019-10-18

性能の観点で見る場合
simpleDsteFormat
DateTimeFormatter
との差は、

使用する環境にもよって違いは出るが、
1万回ではそこまで差異が出ない模様、
大量のデータを使用する場合、差異が出てくる。

原因としては、
simpleDsteFormatはスレッドセーフではないので、毎回生成する。
DateTimeFormatterはスレッドセーフなので、毎回生成ずる必要がない。

単純に書くと、
simpleDsteFormatは呼び出されたら、毎回生成。
DateTimeFormatterは、一回のみの生成。

生成する時間が問題かなと。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0