making my program faster...
Posted: Fri Nov 10, 2006 10:22 pm
hi, I have been making an x86 emulator in C (not ++ ) and I'm attempting to make it faster(don't want a slow emulator like bochs)
so here are my few questions
1. does the -O3 optimization perform any speed optimizations or should I use -Os (in gcc)
2. which is faster, using an array of pointers to functions or using a switch and then calling the functions from the cases of the switch
3. does gcc use the mmx stuff to make it faster? like if I choose a -march= something with mmx will it make it faster?
4. what is a fairly safe limit for the total size of an exe, like I know a 40mb exe is really big and would have speed issues from paging
edit:
5. what is expensive optimizations?
edit2:
6. does the inline modifier on functions make them faster? or what exactly does it do?
so here are my few questions
1. does the -O3 optimization perform any speed optimizations or should I use -Os (in gcc)
2. which is faster, using an array of pointers to functions or using a switch and then calling the functions from the cases of the switch
3. does gcc use the mmx stuff to make it faster? like if I choose a -march= something with mmx will it make it faster?
4. what is a fairly safe limit for the total size of an exe, like I know a 40mb exe is really big and would have speed issues from paging
edit:
5. what is expensive optimizations?
edit2:
6. does the inline modifier on functions make them faster? or what exactly does it do?