HN2
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
im3w1l
on Aug 12, 2022
|
parent
|
context
|
favorite
| on:
Rob Pike's simple C regex matcher in Go
x86 has cmps for doing comparison with postincrement / postdecrement.
rswail
on Aug 12, 2022
|
next
[–]
Sure, but the point was that C was designed to implement Unix and Unix was implemented on DEC machines and DEC machines had a particular architecture around registers that included the pre/post increment, which lead to the C *p++ style to iterate.
im3w1l
on Aug 13, 2022
|
parent
|
next
[–]
I wanted to point out that such instructions are in use to this day rather than being than being something from a long gone era.
azinman2
on Aug 12, 2022
|
prev
[–]
Do compilers use that if you break it apart to something more legible? If you don’t, does the intel cpu end up doing the right thing anyway?
umanwizard
on Aug 12, 2022
|
parent
[–]
Yes, modern compilers should treat them the same.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: