Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3fbc2eefcf863f4c24d3ed9763e86c7e0f6543b2
      
https://github.com/WebKit/WebKit/commit/3fbc2eefcf863f4c24d3ed9763e86c7e0f6543b2
  Author: Sosuke Suzuki <[email protected]>
  Date:   2025-12-31 (Wed, 31 Dec 2025)

  Changed paths:
    M Source/WTF/wtf/CMakeLists.txt
    M Source/WTF/wtf/text/StringImpl.cpp

  Log Message:
  -----------
  [WTF] Optimize `String::fromUTF8` using simdutf
https://bugs.webkit.org/show_bug.cgi?id=304800

Reviewed by Yusuke Suzuki.

This patch changes to optimize `String::fromUTF8` using simdutf.

Here are the benchmark results measured on my local machine (M4 MAX MBP).
ASCII is neutral, and the others large data show significant improvement:

16 chars:
                    original      this patch     speedup

  ASCII only     :   1375.0 MB/s   1410.7 MB/s    1.03x
  Japanese       :   1028.9 MB/s   1210.0 MB/s    1.18x
  Mixed          :    861.2 MB/s    936.5 MB/s    1.09x
  Emoji          :    857.4 MB/s    988.8 MB/s    1.15x

32 chars:
                    original      this patch     speedup

  ASCII only     :   2434.5 MB/s   2538.4 MB/s    1.04x
  Japanese       :   1040.8 MB/s   2188.0 MB/s    2.10x
  Mixed          :    723.2 MB/s   1635.7 MB/s    2.26x
  Emoji          :   1007.1 MB/s   1539.4 MB/s    1.53x

64 chars:
                    original      this patch     speedup

  ASCII only     :   4874.6 MB/s   5203.6 MB/s    1.07x
  Japanese       :   1071.9 MB/s   2914.0 MB/s    2.72x
  Mixed          :    827.9 MB/s   2082.4 MB/s    2.52x
  Emoji          :   1222.0 MB/s   2118.1 MB/s    1.73x

128 chars:
                    original      this patch     speedup

  ASCII only     :   7691.5 MB/s   7701.6 MB/s    1.00x
  Japanese       :   1120.6 MB/s   4147.8 MB/s    3.70x
  Mixed          :    988.1 MB/s   2936.0 MB/s    2.97x
  Emoji          :   1283.0 MB/s   2727.3 MB/s    2.13x

256 chars:
                    original      this patch     speedup

  ASCII only     :  10547.6 MB/s  10894.6 MB/s    1.03x
  Japanese       :   1461.3 MB/s   4491.9 MB/s    3.07x
  Mixed          :   1142.8 MB/s   2978.2 MB/s    2.61x
  Emoji          :   1365.1 MB/s   3316.0 MB/s    2.43x

1K chars:
                    original      this patch     speedup

  ASCII only     :  15578.1 MB/s  15431.4 MB/s    0.99x
  Japanese       :   1049.6 MB/s   4686.6 MB/s    4.47x
  Mixed          :    627.7 MB/s   2986.9 MB/s    4.76x
  Emoji          :    830.1 MB/s   3094.2 MB/s    3.73x

4K chars:
                    original      this patch     speedup

  ASCII only     :  17720.4 MB/s  17419.0 MB/s    0.98x
  Japanese       :   1049.6 MB/s   4895.0 MB/s    4.66x
  Mixed          :    659.9 MB/s   3487.1 MB/s    5.28x
  Emoji          :    941.8 MB/s   2764.5 MB/s    2.94x

10K chars:
                    original      this patch     speedup

  ASCII only     :  18314.3 MB/s  19397.0 MB/s    1.06x
  Japanese       :    620.2 MB/s   4925.0 MB/s    7.94x
  Mixed          :    400.4 MB/s   3524.1 MB/s    8.80x
  Emoji          :    684.5 MB/s   3058.3 MB/s    4.47x

100K chars:
                    original      this patch     speedup

  ASCII only     :  14003.4 MB/s  22619.4 MB/s    1.62x
  Japanese       :    830.0 MB/s   4994.0 MB/s    6.02x
  Mixed          :    717.9 MB/s   3012.6 MB/s    4.20x
  Emoji          :    936.2 MB/s   3357.0 MB/s    3.59x

Test: Tools/TestWebKitAPI/Tests/WTF/UTF8Conversion.cpp

* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::StringImpl::create):

Canonical link: https://commits.webkit.org/305014@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to