WeSearch

What it takes to transpose a matrix

·2 min read · 0 reactions · 0 comments · 12 views
#technology#computing#performance
⚡ TL;DR · AI summary

Writing and reading are often misunderstood as symmetric operations, but they involve different mechanics. Writing is generally more complex and costly than reading due to the need for multiple memory accesses. However, the CPU can optimize writing by using a store buffer to mask latency, although this can lead to performance issues if the buffer becomes full.

Key facts
Original article
Gudok
Read full at Gudok →
Opening excerpt (first ~120 words) tap to expand

It is common misconception to think of writing as of symmetric operation to reading. While logically it may look so, the underlying mechanics is quite different, giving both positive and negative traits to both types of operations. Big downside of writing compared to reading is that to complete write operation memory must be accessed twice. Recall that unit of memory operation is 64B-long cache line. Most of the time programs want to modify only couple of bytes. In order to fully complete a write, CPU has to perform three steps: load entire cache line first, then apply the modification, then write entire cache line back to memory. Such complex procedure increases overall cost of writing up to two times higher than it is for reading.

Excerpt limited to ~120 words for fair-use compliance. The full article is at Gudok.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Gudok