Different Styles of Object Diffs in JS

7 years ago
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Test name Executions per second
DeepDiff (beforeText, afterText) 16368.1 Ops/sec
MongoDBDiff.diff(beforeText, afterText) 13589.4 Ops/sec
MongoDBDiff.diff *.toJS() 6854.2 Ops/sec
ImmutableDiff two mostly shared objects 45969.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • DeepDiff (beforeText, afterText)

  • MongoDBDiff.diff(beforeText, afterText)

  • MongoDBDiff.diff *.toJS()

  • ImmutableDiff two mostly shared objects

Open this result on MeasureThat.net