Amemiya Riya
unread,Jun 25, 2026, 1:04:38 AM (3 days ago) Jun 25Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to v8-dev
Hi all,
While implementing a packed-Smi fast path for Array.prototype.fill, I
noticed that bulk-filling through MemsetTagged did not improve
performance. It turns out that base::Memset in src/base/memcopy.h is a
hand-written for loop that clang does not vectorize well. Rewriting the
same stores with std::fill_n lowers to an optimized fill and is
considerably faster, and this would benefit every caller of
base::Memset, including MemsetTagged.
Before I prepare a CL, I have two questions. Is there an intentional
reason the loop is hand-written rather than using std::fill_n? And if
not, would you be open to me sending a CL to switch it over?
Thanks in advance for your guidance.
Best regards,
Amemiya