HashMap KeySet Iterator use is much slower using instrumented version
---------------------------------------------------------------------

                 Key: CDV-627
                 URL: https://jira.terracotta.org/jira//browse/CDV-627
             Project: Community Development
          Issue Type: Bug
          Components: Byte Code Transform
    Affects Versions: 2.5.1
            Reporter: Alex Miller
            Assignee: Engineering Transparency Team


Forum:  http://forums.terracotta.org/forums/posts/list/818.page

I tested with code below using java/dso-java and saw differences as well.  


import java.util.HashMap;
import java.util.Map;
 
public class IteratorTest
 {
  public static void main(String[] args)
  {
    int num = 10000000;
    String val = "";
    Map<Integer, String> map = new HashMap<Integer, String>();
    
    for ( int i =0 ; i < num; i ++ )
    {
      map.put(i, val);
    }
    
    long begin = System.currentTimeMillis();
    
    for ( Integer s : map.keySet() )
    {
    }
    
    long end = System.currentTimeMillis();
    System.out.println("Time: " + (end-begin));
  }
 }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to