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

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.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: