std/jpeg: call slice.bulk_{load,save}_host_endian

Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59540

name                                             old speed     new speed     delta

wuffs_jpeg_decode_30k_24bpp_progressive/clang11  131MB/s ± 0%  168MB/s ± 0%  +28.44%  (p=0.008 n=5+5)
wuffs_jpeg_decode_30k_24bpp_progressive/gcc10    167MB/s ± 0%  175MB/s ± 0%   +4.80%  (p=0.008 n=5+5)
This commit is contained in:
Nigel Tao committed 2023-06-05 12:51:50 +10:00
1 parent 4a164cda64
commit 2865c5bfbd
7 files changed
+162 -154

No files matched your search

+3 -1
View File
@@ -965,10 +965,12 @@ var SliceFuncs = []string{
"GENERIC T1.uintptr_low_12_bits() u32[..= 4095]",
"GENERIC T1.suffix(up_to: u64) T1",
// The bulk_etc methods are further restricted to those slices whose
// The bulk_etc methods are further restricted to those T1 slices whose
// elements are bulk-numeric types: numerics (e.g. base.u32), arrays of
// numerics, arrays of arrays of numerics, etc.
"GENERIC T1.bulk_load_host_endian!(src: slice u8)",
"GENERIC T1.bulk_memset!(byte_value: u8)",
"GENERIC T1.bulk_save_host_endian!(dst: slice u8)",
}
var SliceU8Funcs = []string{
+2
View File
@@ -732,7 +732,9 @@ func (q *checker) tcheckDot(n *a.Expr, depth uint32) error {
if q.c.isBuiltInSliceFunc(qqid, lTyp) {
bulky := false
switch qqid[2] {
case t.IDBulkLoadHostEndian:
case t.IDBulkMemset:
case t.IDBulkSaveHostEndian:
bulky = true
}
+20 -14
View File
@@ -668,19 +668,22 @@ const (
IDIsOK = ID(0x231)
IDIsSuspension = ID(0x232)
IDBulkMemset = ID(0x240)
IDData = ID(0x241)
IDHeight = ID(0x242)
IDIO = ID(0x243)
IDLimit = ID(0x244)
IDPrefix = ID(0x245)
IDRowU32 = ID(0x246)
IDStride = ID(0x247)
IDSubtable = ID(0x248)
IDSuffix = ID(0x249)
IDUintptrLow12Bits = ID(0x24A)
IDValidUTF8Length = ID(0x24B)
IDWidth = ID(0x24C)
IDBulkLoadHostEndian = ID(0x238)
IDBulkMemset = ID(0x239)
IDBulkSaveHostEndian = ID(0x23A)
IDData = ID(0x240)
IDHeight = ID(0x241)
IDIO = ID(0x242)
IDLimit = ID(0x243)
IDPrefix = ID(0x244)
IDRowU32 = ID(0x245)
IDStride = ID(0x246)
IDSubtable = ID(0x247)
IDSuffix = ID(0x248)
IDUintptrLow12Bits = ID(0x249)
IDValidUTF8Length = ID(0x24A)
IDWidth = ID(0x24B)
IDLimitedSwizzleU32InterleavedFromReader = ID(0x280)
IDSwizzleInterleavedFromReader = ID(0x281)
@@ -1100,7 +1103,10 @@ var builtInsByID = [nBuiltInIDs]string{
IDIsOK: "is_ok",
IDIsSuspension: "is_suspension",
IDBulkMemset: "bulk_memset",
IDBulkLoadHostEndian: "bulk_load_host_endian",
IDBulkMemset: "bulk_memset",
IDBulkSaveHostEndian: "bulk_save_host_endian",
IDData: "data",
IDHeight: "height",
IDIO: "io",