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:
[email protected]


With regards,
Apache Git Services

Reply via email to