Clojure

Improve speed of STM by removing System.currentTimeMillis

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: Release 1.3
  • Fix Version/s: Release 1.6
  • Component/s: None
  • Labels:
  • Environment:
    Tested on Ubuntu and OSX
  • Patch:
    Code
  • Approval:
    Ok

Description

The inner class TVal in LockingTransaction and Ref has an unused milliseconds field (that is populated with System.currentTimeMillis()).

This patch removes the milliseconds from inner class TVal in LockingTransaction.java and Ref.java. Using a little test suite[1] a increase of performance by up to 25% could be measured.

Original post: https://groups.google.com/d/topic/clojure/kc99LcUK8Tk/discussion

References:
[1] https://github.com/ska2342/clj-stm-perf-test/

Screened by: Alex Miller

Activity

Rich Hickey made changes -
Field Original Value New Value
Fix Version/s Release 1.5 [ 10150 ]
Stuart Halloway made changes -
Fix Version/s Release 1.5 [ 10150 ]
Fix Version/s Release 1.6 [ 10157 ]
Alex Miller made changes -
Approval Vetted [ 10003 ]
Hide
Alex Miller added a comment -

Patch applies cleanly. Author is a contributor.

Did not verify performance claims but I can't see how removing fields and calls to System.currentTimeMillis() could do anything but make STM usage smaller and faster.

Marking Screened.

Show
Alex Miller added a comment - Patch applies cleanly. Author is a contributor. Did not verify performance claims but I can't see how removing fields and calls to System.currentTimeMillis() could do anything but make STM usage smaller and faster. Marking Screened.
Alex Miller made changes -
Approval Vetted [ 10003 ] Screened [ 10004 ]
Description Original post: https://groups.google.com/d/topic/clojure/kc99LcUK8Tk/discussion

This patch removes the milliseconds from inner class TVal in LockingTransaction.java and Ref.java. Using a little test suite[1] a increase of performance by up to 25% could be measured.

If necessary I can recreate the patch against current MASTER.

References:
[1] https://github.com/ska2342/clj-stm-perf-test/
The inner class {{TVal}} in {{LockingTransaction}} and {{Ref}} has an unused milliseconds field (that is populated with {{System.currentTimeMillis()}}).

This patch removes the milliseconds from inner class TVal in LockingTransaction.java and Ref.java. Using a little test suite[1] a increase of performance by up to 25% could be measured.

Original post: https://groups.google.com/d/topic/clojure/kc99LcUK8Tk/discussion

References:
[1] https://github.com/ska2342/clj-stm-perf-test/

Alex Miller made changes -
Description The inner class {{TVal}} in {{LockingTransaction}} and {{Ref}} has an unused milliseconds field (that is populated with {{System.currentTimeMillis()}}).

This patch removes the milliseconds from inner class TVal in LockingTransaction.java and Ref.java. Using a little test suite[1] a increase of performance by up to 25% could be measured.

Original post: https://groups.google.com/d/topic/clojure/kc99LcUK8Tk/discussion

References:
[1] https://github.com/ska2342/clj-stm-perf-test/

The inner class {{TVal}} in {{LockingTransaction}} and {{Ref}} has an unused milliseconds field (that is populated with {{System.currentTimeMillis()}}).

This patch removes the milliseconds from inner class TVal in LockingTransaction.java and Ref.java. Using a little test suite[1] a increase of performance by up to 25% could be measured.

Original post: https://groups.google.com/d/topic/clojure/kc99LcUK8Tk/discussion

References:
[1] https://github.com/ska2342/clj-stm-perf-test/

*Screened by*: Alex Miller

Alex Miller made changes -
Labels performance
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Stuart Halloway made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: