systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [systemml] j143-bot commented on issue #862: Systemml 2526 Date.getTime() can be changed to System.currentTimeMillis()
Date Sat, 13 Apr 2019 17:49:16 GMT
j143-bot commented on issue #862: Systemml 2526 Date.getTime() can be changed to System.currentTimeMillis()
URL: https://github.com/apache/systemml/pull/862#issuecomment-482851094
 
 
   Hi @bd2019us , thanks for providing the script that was used for reaching the previous
figures.
   
   output is:
   ```
   SystemML's date cost [2274] ms
   System.currentTimeMillis cost [255] ms
   ```
   
   Script:
   ```java
   import java.util.Date;
   import java.util.ArrayList;
   
   public class TimeTest {
       public static void main(String[] args) {
           System.out.println("Start");
           ArrayList<Long> l = new ArrayList<>(5000001);
           long start = System.currentTimeMillis();
           for(int i = 0; i < 5000000; i++) {
               long now = new Date().getTime();
               l.add(now);
           }
           System.out.println("SystemML's date cost [" + (System.currentTimeMillis() - start)
+ "] ms");
           l.clear();
   
           start = System.currentTimeMillis();
           for(int i=0; i < 5000000; i++) {
               long now = System.currentTimeMillis();
               l.add(now);
           }
           System.out.println("System.currentTimeMillis cost [" + (System.currentTimeMillis()
- start) + "] ms");
           l.clear();
       }
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message