Skip to content

jackson object-mapper custom SimpleDateFormat vs FastDateFormat Benchmark

Notifications You must be signed in to change notification settings

dmonteverde/object-mapper-date

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jackson object-mapper custom SimpleDateFormat vs FastDateFormat Benchmark

Purpose

Compare different ways to customize date deserializer for objectMapper. One case is not thread-safe and generates incorrect dates.

Definitions

  • SDF = SimpleDateFormat
  • FDF = FastDateFormat

Evaluate alternatives are

  • SDF: objectMapper using setDateFormat with SDF.
  • SDF by WRAPPER - NOT CLONE (not thread-safe!): objectMapper using setDateFormat with a DateFormat wrapper using SDF, with wrong clone implemtation.
  • SDF by WRAPPER - FULL CLONE: objectMapper using setDateFormat with a DateFormat wrapper using SDF.
  • FDF by WRAPPER: objectMapper using setDateFormat with a DateFormat wrapper using FDF.
  • withCustomDateDeserializer (FDF): objectMapper using a custom module that defines a date deserializer with FDF.

Technology

  • maven
  • j11

Test

mvn install

java -jar ./target/omd-jar-with-dependencies.jar

image info

java -jar ./target/omd-jar-with-dependencies.jar {sample_size} {pool_thread_size}

image info

About

jackson object-mapper custom SimpleDateFormat vs FastDateFormat Benchmark

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages