Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate replacing double_conversion library with fast_float #2772

Commits on Dec 10, 2022

  1. Investigate replacing double_conversion library with fast_float

    https://bugs.webkit.org/show_bug.cgi?id=221178
    
    Reviewed by Sam Weinig.
    
    Parsing double numbers becomes 2x faster.
    
                                      ToT                     Patched
    
        json-parse-double      230.0022+-0.0838     ^    111.1297+-0.0983        ^ definitely 2.0697x faster
    
    Apple OSS approval for fast_float is OSS-4890.
    
    * Source/WTF/WTF.xcodeproj/project.pbxproj:
    * Source/WTF/wtf/CMakeLists.txt:
    * Source/WTF/wtf/FastFloat.cpp: Added.
    (WTF::parseDouble):
    * Source/WTF/wtf/FastFloat.h: Added.
    * Source/WTF/wtf/dtoa.h:
    * Source/WTF/wtf/fast_float/LICENSE: Added.
    * Source/WTF/wtf/fast_float/ascii_number.h: Added.
    (fast_float::byteswap):
    (fast_float::read_u64):
    (fast_float::write_u64):
    (fast_float::parse_eight_digits_unrolled):
    * Source/WTF/wtf/fast_float/bigint.h: Added.
    (fast_float::stackvec::stackvec):
    (fast_float::bigint::bigint):
    * Source/WTF/wtf/fast_float/decimal_to_binary.h: Added.
    (fast_float::compute_product_approximation):
    * Source/WTF/wtf/fast_float/digit_comparison.h: Added.
    * Source/WTF/wtf/fast_float/fast_float.h: Added.
    (fast_float::parse_options::parse_options):
    * Source/WTF/wtf/fast_float/fast_table.h: Added.
    * Source/WTF/wtf/fast_float/float_common.h: Added.
    (fast_float::fastfloat_strncasecmp):
    (fast_float::span::span):
    (fast_float::value128::value128):
    (fast_float::leading_zeroes):
    (fast_float::emulu):
    (fast_float::_umul128):
    (fast_float::full_multiplication):
    (fast_float::adjusted_mantissa::operator== const):
    (fast_float::adjusted_mantissa::operator!= const):
    (fast_float::binary_format<double>::mantissa_explicit_bits):
    (fast_float::binary_format<float>::mantissa_explicit_bits):
    (fast_float::binary_format<double>::max_exponent_round_to_even):
    (fast_float::binary_format<float>::max_exponent_round_to_even):
    (fast_float::binary_format<double>::min_exponent_round_to_even):
    (fast_float::binary_format<float>::min_exponent_round_to_even):
    (fast_float::binary_format<double>::minimum_exponent):
    (fast_float::binary_format<float>::minimum_exponent):
    (fast_float::binary_format<double>::infinite_power):
    (fast_float::binary_format<float>::infinite_power):
    (fast_float::binary_format<double>::sign_index):
    (fast_float::binary_format<float>::sign_index):
    (fast_float::binary_format<double>::min_exponent_fast_path):
    (fast_float::binary_format<float>::min_exponent_fast_path):
    (fast_float::binary_format<double>::max_exponent_fast_path):
    (fast_float::binary_format<float>::max_exponent_fast_path):
    (fast_float::binary_format<double>::max_mantissa_fast_path):
    (fast_float::binary_format<float>::max_mantissa_fast_path):
    (fast_float::binary_format<double>::exact_power_of_ten):
    (fast_float::binary_format<float>::exact_power_of_ten):
    (fast_float::binary_format<double>::largest_power_of_ten):
    (fast_float::binary_format<float>::largest_power_of_ten):
    (fast_float::binary_format<double>::smallest_power_of_ten):
    (fast_float::binary_format<float>::smallest_power_of_ten):
    (fast_float::binary_format<double>::max_digits):
    (fast_float::binary_format<float>::max_digits):
    (fast_float::binary_format<float>::exponent_mask):
    (fast_float::binary_format<double>::exponent_mask):
    (fast_float::binary_format<float>::mantissa_mask):
    (fast_float::binary_format<double>::mantissa_mask):
    (fast_float::binary_format<float>::hidden_bit_mask):
    (fast_float::binary_format<double>::hidden_bit_mask):
    (fast_float::to_float):
    * Source/WTF/wtf/fast_float/parse_number.h: Added.
    * Source/WTF/wtf/fast_float/simple_decimal_conversion.h: Added.
    (fast_float::detail::trim):
    (fast_float::detail::number_of_digits_decimal_left_shift):
    (fast_float::detail::round):
    (fast_float::detail::decimal_left_shift):
    (fast_float::detail::decimal_right_shift):
    (fast_float::compute_float):
    (fast_float::parse_long_mantissa):
    
    Canonical link: https://commits.webkit.org/257675@main
    Constellation committed Dec 10, 2022
    Configuration menu
    Copy the full SHA
    178e072 View commit details
    Browse the repository at this point in the history