[Git][NTPsec/ntpsec][master] Deleted 1 commit: Another 40% speed up.

Gary E. Miller gitlab at mg.gitlab.com
Sat Aug 20 03:14:49 UTC 2016


Gary E. Miller pushed to branch master at NTPsec / ntpsec


WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.


Deleted commits:
fed9f5f8 by Gary E. Miller at 2016-08-19T20:14:00-07:00
Another 40% speed up.

Measure twice, split once.

- - - - -


1 changed file:

- pylib/statfiles.py


Changes:

=====================================
pylib/statfiles.py
=====================================
--- a/pylib/statfiles.py
+++ b/pylib/statfiles.py
@@ -17,15 +17,16 @@ class NTPStats:
         "convert timestamp (MJD & seconds past midnight) to Unix time"
         "Replace MJD+second with Unix time."
         try:
-            mjd = int(line.split()[0])
-            second = float(line.split()[1])
+            split = line.split()
+            mjd = int(split[0])
+            second = float(split[1])
         except:
             # unparseable  time 0 and it will be stripped later
             return None
         time = 24*60*60*mjd+second-3506716800; # warning: 32 bit overflows
         if time < starttime or time > endtime:
             return None
-        return str( str(time) + " " + " ".join(line.split()[2:]))
+        return str( str(time) + " " + " ".join(split[2:]))
     @staticmethod
     def timestamp(line):
         "get Unix time from converted line."



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/fed9f5f847667b90a6c469953156748b6b9bad54
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160820/8325969d/attachment.html>


More information about the vc mailing list