The register is an under-appreciated writing device that can add some real flair to your work. It’s complicated to understand, but once you do it’s a powerful tool that can change the way your audience responds to your text.
In a computer, a register is a small area of fast memory directly accessible to the CPU and used for storing input data or output values and intermediate results of calculations. It’s important to understand how these registers work because they can help you write faster and more efficient code.
Basically, the register keyword tells the compiler that you expect this variable to be read and written often enough to justify its use in one of the few registers available for variable storage. Having it in a register means the compiler can avoid pushing it onto the stack and reading it from memory every time it’s read (which can be very expensive) by just keeping a copy in the temporary register.
This is important because it allows the compiler to save a lot of memory in inner loops, where the code most frequently reads and writes variables. This can translate into a significant speed-up, especially on CPU architectures that have few registers and operate at a high frequency.
In practice, though, the register keyword has largely been ignored by modern optimizing compilers. It used to be relevant on older CPU architectures with more registers but now it’s mostly just a reminder that the compiler should prevent the address of the register variable from being taken. Modern CPUs have enough registers that this isn’t usually a problem, and the optimizer is generally better at determining whether or not a variable should be kept in a register anyway.
Register is also important for adjusting the formality or informality of your rhetorical situation. For example, if you’re writing to a colleague in an informal setting, using register in this context may be appropriate and welcome. But if you’re writing to a client in an official setting, it’s probably best to stick to more formal language that will demonstrate your professionalism and respect for the client’s authority.
We all use register without even realizing it, shifting the way we speak between different situations and audiences. But it’s more than just changing the diction of our words—understanding register helps us become more conscious of the choices we make when composing our writing, and more capable of adjusting them as needed. As you read today, consider the register of the various sources you encounter: blog posts, emails from big companies, newspaper articles and text messages. How do the diction, vocabulary and tone of these texts compare? How do they differ from one another, and how does this affect the way you receive them?