<?xml version="1.0"?>
<rss version="2.0">
<channel>

  
<title>Kai`s Blog - concurrency vs. synchronization</title>
<link>http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html</link>
<description>After getting up this morning I thought it would be good to contribute something back to my favourite ORM tool: iBATIS. I picked up IBATIS-508 and tried to create a unit test before applying the patch. Unfortunately I was not able to create one so I ...</description>
<language>en</language>
<managingEditor>Kai Grabfelder</managingEditor>
<lastBuildDate>Sat, 06 Mar 2010 11:04:12 GMT</lastBuildDate>
  
  

  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>Re: concurrency vs. synchronization</title>
    <link>http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comment1267873452055</link>
    <description>
      Somewhat late, but here are my results:

impl. strategy: no synchronization avg calls per thread: 26.076.005
impl. strategy: synchronized block avg calls per thread: 6.120.937
impl. strategy: synchronized block + Collections.synchronizedMap avg calls per thread: 3.165.427
impl. strategy: Collections.synchronizedMap avg calls per thread: 6.860.422
impl. strategy: java5 ConcurrentHashMap avg calls per thread: 22.508.639


3.3GHz Dual Core. It&#039;s a nice CPU Benchmark ;)


    </description>
    <author>Arthur</author>
    <comments>http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comments</comments>
    <guid isPermaLink="true">http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comment1267873452055</guid>
    <pubDate>Sat, 06 Mar 2010 11:04:12 GMT</pubDate>
  </item>
  
  <item>
    <title>Re: concurrency vs. synchronization</title>
    <link>http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comment1241454595462</link>
    <description>
      thanks for the comments. I don&#039;t think that duplicated ClassInfo classes are a problem. I doub&#039;t that anybody is using == on them. 

@frz: I was not aware that ClassInfo2 could break the HashMap. I thought concurrent access would be fine as long as the key is different between the different threads. Thanks for pointing this out!
    </description>
    <author>Kai Grabfelder</author>
    <comments>http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comments</comments>
    <guid isPermaLink="true">http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comment1241454595462</guid>
    <pubDate>Mon, 04 May 2009 16:29:55 GMT</pubDate>
  </item>
  
  <item>
    <title>Re: concurrency vs. synchronization</title>
    <link>http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comment1241436573287</link>
    <description>
      ClassInfo2 does not work as you could concurrently access the HashMap for different clazz&#039;es which can break it.
    </description>
    <author>Frz</author>
    <comments>http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comments</comments>
    <guid isPermaLink="true">http://www.kaigrabfelder.de/en/2009/05/01/concurrency_vs_synchronization.html#comment1241436573287</guid>
    <pubDate>Mon, 04 May 2009 11:29:33 GMT</pubDate>
  </item>
  
  </channel>
</rss>
