systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [systemml] ex00 commented on issue #862: Systemml 2526 Date.getTime() can be changed to System.currentTimeMillis()
Date Sat, 27 Apr 2019 22:08:53 GMT
ex00 commented on issue #862: Systemml 2526 Date.getTime() can be changed to System.currentTimeMillis()
URL: https://github.com/apache/systemml/pull/862#issuecomment-487323518
 
 
   Hi,
   I assume that need to pay attention to converting time to string object too. 
   My small test: 
   ```java
   @Benchmark
       public String longObjectToString() {
           Long time = new Long(System.currentTimeMillis());
           return time.toString();
       }
   
       @Benchmark
       public String longToString() {
           return Long.toString(System.currentTimeMillis());
       }
   
       @Benchmark
       public String stringValueOf() {
           return String.valueOf(System.currentTimeMillis());
       }
   ```
   results:
   ```
   Benchmark                                                    Mode       Cnt        Score
     Error   Units
   MyBenchmark.longObjectToString                              thrpt        30        0.020
±    0.001  ops/ns
   MyBenchmark.longToString                                    thrpt        30        0.021
±    0.001  ops/ns
   MyBenchmark.stringValueOf                                   thrpt        30        0.021
±    0.001  ops/ns
   MyBenchmark.longObjectToString                               avgt        30       47.306
±    0.048   ns/op
   MyBenchmark.longToString                                     avgt        30       47.263
±    0.226   ns/op
   MyBenchmark.stringValueOf                                    avgt        30       47.002
±    0.075   ns/op
   ```

----------------------------------------------------------------
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