Improve speed of STM by removing System.currentTimeMillis

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

Environment

Tested on Ubuntu and OSX

Attachments

1

Activity

Show:

Alex Miller August 8, 2013 at 8:48 AM

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.

Completed

Details

Assignee

Reporter

Approval

Ok

Patch

Code

Priority

Affects versions

Fix versions

Created October 17, 2011 at 9:09 PM
Updated November 23, 2013 at 1:06 AM
Resolved November 23, 2013 at 1:06 AM