Memory access on the Apple M1 processor
1–10 of 278 posts
Re: Memory access on the Apple M1 processor
#2It's faster because it has more microarchitectural resources. It can load and store more, and it can do with a single core what an Intel part needs all cores to accomplish.
Re: Memory access on the Apple M1 processor
#3Re: Memory access on the Apple M1 processor
#4Re: Memory access on the Apple M1 processor
#5Re: Memory access on the Apple M1 processor
#6 sysconf(_SC_PAGESIZE); /* posix */
Can you get direct processor information like LEVEL1_ICACHE_ASSOC and LEVEL1_ICACHE_LINESIZE from the M1??Re: Memory access on the Apple M1 processor
#7Shouldn’t you choose the random numbers such that array[idx1] ^ array[idx1 + 1] are guaranteed to fall in the same cache line? Assuming that it has that. Right now some accesses cross the end of the cache line.
Re: Memory access on the Apple M1 processor
#8What's the precision of these ns level measurements?
Two examples( that are slightly bigger than this but the same principles apply):
If you benchmark a std::vector at insertion, you'll see a flat graph with n tall spikes at ratios of it's reallocation amount apart, and it scales very very well. The measurements are clean.
If, however, you do the same for a linked list you get a linearly increasing graph but it's absolutely all over the place because it doesn't play nice with the memory hierarchy. The std_dev of a given value of n might be a hundred times worse than the vector.
Re: Memory access on the Apple M1 processor
#9What's the precision of these ns level measurements?
Re: Memory access on the Apple M1 processor
#10What is the cache line size and page table size in M1? sysconf(_SC_PAGESIZE); /* posix */ Can you get direct processor information like LEVEL1_ICACHE_ASSOC and LEVEL1_ICACHE_LINESIZE from the M1??
The L1 cache values aren't there. The macOS `getconf` doesn't support -a (listing all variables), so they may just be under a different name.
edit: see replies for `sysctl -a` output