From: SourceForge.net <no...@so...> - 2010-03-17 17:20:56
|
Bugs item #2971767, was opened at 2010-03-17 05:31 Message generated for change (Comment added) made by zthree You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=559154&aid=2971767&group_id=80240 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: runtime Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Joel (joelschmidt) >Assigned to: Lars Braubach (zthree) Summary: unnecessary calls to Map lookups in setProperty Initial Comment: I noticed this one when doing some profiling of my Jadex application. SynchronizedPropertyObject.setProperty(String, Object) .... oldval = properties.get(name); properties.put(name, value); ... Map.put(key, value) returns the previous value associated with that key, so these two statements can be compressed into oldval = properties.put(name, value); halving the number of map look-ups in the function. ---------------------------------------------------------------------- >Comment By: Lars Braubach (zthree) Date: 2010-03-17 17:20 Message: done in current svn ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=559154&aid=2971767&group_id=80240 |