I was trying to be less exhaustive this time, so I one think I didn't mention is that the roughly 30x result holds over a fairly large range of buffer sizes, but not for small buffers (where constant overhead slows things down), and also not for buffers outside the L2 ...
-
-
-
... where the bottleneck is L3 or DRAM thoughput. The "other" way (byte-by-byte) is so slow is basically the same speed no matter how large the buffer, because the CPU is always the bottleneck.
- Još 1 odgovor
Novi razgovor -
-
-
Is some of this down to a char* being used when wanting to zero the array vs an int*?
-
In a way, int* is a middle ground. At -O2 with gicc, it will never be really fast: it will always use an int-at-a-time loop, but that loop is at least 4x as fast (per byte) as a byte-by-byte loop, since 4 bytes are written at a time. int isn't even eligible for the libstc++ ...
- Još 1 odgovor
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
