Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Image Processing with Goole Earth Pin
CPallini15-Jul-08 22:30
mveCPallini15-Jul-08 22:30 
GeneralRe: Image Processing with Goole Earth Pin
Blade_Bao15-Jul-08 22:45
Blade_Bao15-Jul-08 22:45 
JokeRe: Image Processing with Goole Earth Pin
Rajesh R Subramanian15-Jul-08 22:44
professionalRajesh R Subramanian15-Jul-08 22:44 
JokeRe: Image Processing with Goole Earth Pin
CPallini16-Jul-08 2:08
mveCPallini16-Jul-08 2:08 
QuestionTwo basic questions about generated assembly Pin
George_George15-Jul-08 21:02
George_George15-Jul-08 21:02 
AnswerRe: Two basic questions about generated assembly PinPopular
Rajesh R Subramanian15-Jul-08 21:28
professionalRajesh R Subramanian15-Jul-08 21:28 
GeneralRe: Two basic questions about generated assembly Pin
George_George15-Jul-08 21:36
George_George15-Jul-08 21:36 
GeneralRe: Two basic questions about generated assembly Pin
Rajesh R Subramanian15-Jul-08 22:25
professionalRajesh R Subramanian15-Jul-08 22:25 
George_George wrote:
"it probably must execute in a single cycle and therefore would surely be faster than mul" -- do you have any documents to support this statement?


With the LEA instruction, the x86 processor can now perform a 3-number add, with something like a C expression "a = b + c + 10;" translating into EAX = EBX+ECX+10 and being coded into one instruction:

LEA EAX,[EBX+ECX+10]

Notice that no memory is actually referenced. LEA is used merely to calculate values by performing the addition of a base register (EBX) with an index register (ECX) with some constant displacement (10). This is what the address generation unit (AGU) does, allowing the processor to quickly calculate addresses of array elements, screen pixel locations, and do some basic arithmetic in one clock cycle. Source: http://www.emulators.com/docs/pentium_1.htm[^]

Refer to pages 6 & 7 in this PDF (Pentium: Not the same old song)[^]. This too supports my earlier statement.

Also, read "Handy info on speeding up integer instructions" in this page[^]

Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.


Microsoft MVP - Visual C++[^]

GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 21:19
George_George16-Jul-08 21:19 
GeneralWhoever downvoted me Pin
Rajesh R Subramanian15-Jul-08 21:44
professionalRajesh R Subramanian15-Jul-08 21:44 
GeneralRe: Whoever downvoted me Pin
George_George15-Jul-08 21:50
George_George15-Jul-08 21:50 
GeneralRe: Whoever downvoted me Pin
Rajesh R Subramanian15-Jul-08 21:58
professionalRajesh R Subramanian15-Jul-08 21:58 
GeneralRe: Whoever downvoted me Pin
George_George15-Jul-08 22:06
George_George15-Jul-08 22:06 
GeneralRe: Whoever downvoted me Pin
Rajesh R Subramanian15-Jul-08 22:11
professionalRajesh R Subramanian15-Jul-08 22:11 
GeneralRe: Whoever downvoted me Pin
ThatsAlok17-Jul-08 22:18
ThatsAlok17-Jul-08 22:18 
GeneralRe: Whoever downvoted me Pin
Rajesh R Subramanian17-Jul-08 23:07
professionalRajesh R Subramanian17-Jul-08 23:07 
AnswerRe: Two basic questions about generated assembly Pin
Stephen Hewitt15-Jul-08 21:36
Stephen Hewitt15-Jul-08 21:36 
GeneralRe: Two basic questions about generated assembly Pin
George_George15-Jul-08 21:42
George_George15-Jul-08 21:42 
GeneralRe: Two basic questions about generated assembly Pin
Stephen Hewitt15-Jul-08 21:46
Stephen Hewitt15-Jul-08 21:46 
GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 0:49
George_George16-Jul-08 0:49 
QuestionRe: Two basic questions about generated assembly Pin
Rajesh R Subramanian16-Jul-08 0:56
professionalRajesh R Subramanian16-Jul-08 0:56 
AnswerRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 1:09
George_George16-Jul-08 1:09 
GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 19:08
George_George16-Jul-08 19:08 
GeneralRe: Two basic questions about generated assembly Pin
Stephen Hewitt16-Jul-08 20:02
Stephen Hewitt16-Jul-08 20:02 
GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 20:54
George_George16-Jul-08 20:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.