From dev-return-2674-archive-asf-public=cust-asf.ponee.io@systemml.apache.org Sat Apr 27 22:08:54 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6D6F6180630 for ; Sun, 28 Apr 2019 00:08:54 +0200 (CEST) Received: (qmail 85610 invoked by uid 500); 27 Apr 2019 22:08:53 -0000 Mailing-List: contact dev-help@systemml.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.apache.org Delivered-To: mailing list dev@systemml.apache.org Received: (qmail 85599 invoked by uid 99); 27 Apr 2019 22:08:53 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Apr 2019 22:08:53 +0000 From: GitBox To: dev@systemml.apache.org Subject: [GitHub] [systemml] ex00 commented on issue #862: Systemml 2526 Date.getTime() can be changed to System.currentTimeMillis() Message-ID: <155640293347.4896.11245853695259209424.gitbox@gitbox.apache.org> Date: Sat, 27 Apr 2019 22:08:53 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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