Speed up safe_strtod and safe_strtof functions by using double-conversion library (#12102)
* Add double-conversion library to third_party Link: https://github.com/google/double-conversion Version: v3.0.0 With patch (add case insensivity for special values): https://github.com/google/double-conversion/pull/47 * Strnlen function to str_util.h Returns the length of the given null-terminated byte string 'str'. Returns strsz if the null character was not found in the first 'strsz' bytes of 'str'. * Use double-conversion lib for safe_strto{d,f} implementation * Path for double-conversion library is no longer needed, just use new version of this lib * Use more obvious arguments names for Strnlen function * Fixed DoubleToBuffer function in case of [full_precision_needed] use safe_strtod insetead of raw inplementation * add double-conversion compilation in makefile builds - created compilation script: compile_double_conversion.sh - added running compile_double_conversion.sh in {build_all_android.sh, build_all_ios.sh, build_all_linux.sh} - added linking libdouble-conversion.a to build in tensorflow/contrib/makefile/Makefile * Build double-conversion directly inside tensorflow/contrib/makefile/Makefile * Put double_conversion to the rest of targets including number.* as src * Sort external dependencies and make Sanity Checks happy * Add test cases with trailing and leading whitespace characters to //tensorflow/core:lib_strings_numbers_test * Remove octal numbers support from safe_strtod and safe_strtof * Add double-conversion library to the cmake build * Prepend lib/ to cmake lib path as per mrry instructions See https://www.github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/cmake/external/zlib.cmake#L24 * Add to double-conversion win32 build output path: fix up windows CMake build
Loading
Please sign in to comment