Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fb30ea0502c628aa0c469505cc754deac4b767c6
      
https://github.com/WebKit/WebKit/commit/fb30ea0502c628aa0c469505cc754deac4b767c6
  Author: Xabier Rodriguez-Calvar <[email protected]>
  Date:   2025-09-24 (Wed, 24 Sep 2025)

  Changed paths:
    M Source/WTF/wtf/Vector.h

  Log Message:
  -----------
  [WTF] Fix performance when creating Vectors from different constness
https://bugs.webkit.org/show_bug.cgi?id=299008

Reviewed by Chris Dumez.

For example, when you try to create a Vector<uint8_t> from a span<const 
uint8_t>, templates will consider both types
different and even when you pass true to the template, the second 
VectorCopier::uninitializedCopy function will be used
and will defer to the slow version.

My use case was in MSE, creating a SharedBuffer implies creating a 
FragmentedSharedBuffer and then a DataSegment that
implicitly creates a Vector<uint8_t> from a span<const uint8_t>. If you're 
copying 2.5MB, time is reduced to 33% of the
initial one.

* Source/WTF/wtf/Vector.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to