Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Performance Comparison

alikh31 edited this page Oct 12, 2014 · 3 revisions

Snow Crash Performance Comparison

Comparing Snow Crash performance before and after its architecture refactoring. Every fixture is parsed 1000 times. Total time, mean time and standard deviation are recorded.

NOTE: This Wiki page is part of #114

Fixture 1

  • 175 lines, 5120 characters
  • test/performance/fixtures/fixture-1.apib

Pre-refactor

total: 11.2356s mean: 0.0112356 +/- 0.000259528s

Post-refactor

total: 6.01682s mean: 0.00601682 +/- 0.00026836s

Conclusion

Snow Crash is 1.87x faster after the refactor.

Fixture 2

  • 2456 lines, 61227 characters
  • test/performance/fixtures/fixture-2.apib

Pre-refactor

total: 270.935s mean: 0.270935 +/- 0.0015481s

Post-refactor

total: 9.98349s mean: 0.00998349 +/- 0.000154583s

Conclusion

Snow Crash is 27.14x faster after the refactor.

Fixture 3

  • 10364 lines, 367010 characters
  • test/performance/fixtures/fixture-3.apib

Pre-refactor

total: 8880.93s mean: 8.88093 +/- 97.902s

Post-refactor

total: 272.966s mean: 0.272966 +/- 0.00145955s

Conclusion


Results Overview

line count character count pre-refactor (s) post-refactor (s) speed gain
fixture 1 175 5120 11.2356 6.01682 1.87x
fixture 2 2456 61227 270.935 9.98349 27.14x
fixture 3 10364 367010 8880.93 272.966 32.53x

NOTE: Parse times are per 1000 parsings of the fixtures



Change in referencing Method Performance Comparison

Comparing Snow Crash performance before and after implementation of lazy referencing. Every fixture is parsed 1000 times. Total time, mean time and standard deviation are recorded.

NOTE: This Wiki page is part of issue #84

Fixture 1

  • 175 lines, 4946 characters
  • test/performance/fixtures/fixture-1.apib

Before change

total: 11.4514s mean: 0.0114514 +/- 0.00696401s

After change

total: 11.466s mean: 0.011466 +/- 0.00688481s

Conclusion

Fixture 2

  • 2456 lines, 58772 characters
  • test/performance/fixtures/fixture-2.apib

Before change

total: 56.7685s mean: 0.0567685 +/- 0.00755722s

After change

total: 31.6681s mean: 0.0316681 +/- 0.00266118s

Conclusion

Snow Crash is 1.79x faster after the refactor.

Fixture 3

  • 10364 lines, 356647 characters
  • test/performance/fixtures/fixture-3.apib

Before change

total: 952.491s mean: 0.952491 +/- 0.00440549s

After change

total: 863.571s mean: 0.863571 +/- 0.0129541s

Conclusion

Snow Crash is 1.10x faster after the refactor.

Fixture 4

  • 8390 lines, 145569 characters
  • test/performance/fixtures/fixture-4.apib

Before change

total: 1976.06s mean: 1.97606 +/- 0.00769234s

After change

total: 1976.28s mean: 1.97628 +/- 0.0270102s

Conclusion


Results Overview

line count character count Before change (s) After change (s) speed change
fixture 1 175 4946 11.4514 11.466 1.0
fixture 2 2456 58772 56.7685 31.6681 1.79
fixture 3 10364 356647 952.49 863.571 1.1
fixture 4 8390 145569 1976.06 1976.28 1.0

NOTE: Parse times are per 1000 parsings of the fixtures