Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

INC/DEC speed (Announce)

posted by Rugxulo Homepage, Usono, 22.12.2009, 19:01

> > INC/DEC are slow on Pentium 4 on up, and forbidden completely in 64-bit
> > mode. GCC actually generates this a lot when using -mtune=generic or
> > similar.
>
> Quotation needed. AFAIK on Pentium 4 etc. INC and DEC ar as fast as SUB 1
> ADD 1. Perhaps you want to say that multiple INCs and DECs are slower than
> ADD and SUB or that on 64-bit CPUs the carry flag is not affected by them
> as opposed to SUB 1 and ADD 1.

I don't remember exactly, so I may be saying it incorrectly. But I think it really is slower on P4s. On 64-bit, I thought the REX prefix was the INC/DEC opcode reused (so as to not pollute / bloat the opcode space).

 

Complete thread:

Back to the forum
Board view  Mix view
22777 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum