Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
QuestionRefactoring versus Performance Pin
Agent__00714-Jul-14 19:42
professionalAgent__00714-Jul-14 19:42 
AnswerRe: Refactoring versus Performance Pin
Bernhard Hiller14-Jul-14 20:36
Bernhard Hiller14-Jul-14 20:36 
GeneralRe: Refactoring versus Performance Pin
Agent__00714-Jul-14 20:55
professionalAgent__00714-Jul-14 20:55 
AnswerRe: Refactoring versus Performance Pin
Kornfeld Eliyahu Peter14-Jul-14 21:35
professionalKornfeld Eliyahu Peter14-Jul-14 21:35 
GeneralRe: Refactoring versus Performance Pin
Agent__00714-Jul-14 21:49
professionalAgent__00714-Jul-14 21:49 
GeneralRe: Refactoring versus Performance Pin
OriginalGriff14-Jul-14 21:49
mveOriginalGriff14-Jul-14 21:49 
AnswerRe: Refactoring versus Performance Pin
OriginalGriff14-Jul-14 21:03
mveOriginalGriff14-Jul-14 21:03 
GeneralRe: Refactoring versus Performance Pin
Agent__00714-Jul-14 21:45
professionalAgent__00714-Jul-14 21:45 
GeneralRe: Refactoring versus Performance Pin
Rob Philpott14-Jul-14 21:48
Rob Philpott14-Jul-14 21:48 
GeneralRe: Refactoring versus Performance Pin
OriginalGriff14-Jul-14 21:53
mveOriginalGriff14-Jul-14 21:53 
GeneralRe: Refactoring versus Performance Pin
Rob Philpott14-Jul-14 22:12
Rob Philpott14-Jul-14 22:12 
GeneralRe: Refactoring versus Performance Pin
OriginalGriff14-Jul-14 22:45
mveOriginalGriff14-Jul-14 22:45 
GeneralRe: Refactoring versus Performance Pin
Rob Philpott14-Jul-14 22:54
Rob Philpott14-Jul-14 22:54 
GeneralRe: Refactoring versus Performance Pin
Rob Philpott14-Jul-14 22:28
Rob Philpott14-Jul-14 22:28 
OriginalGriff wrote:
it's still true that a good, experienced coder can beat the compiler sometimes

Whilst I'm rambling it became clear recently that assembly can considerably beat compilers. I was playing around with the ARM toolchain after a 20 year absence from ARM world. In that time conventions (forgotten what they are called) have been invented to preserve registers when branching from one function to another to allow for compiler interoperability.

Net effect of this, is that before a branch the compiler pushes registers to the stack in case the branch method does anything with them then pops them coming back. If that register isn't used its a needless operation. So my little blinking LED flashed about 5 times as quick with native ARM vs. that of the compiler.

I was all for writing everything is assembler for at least quarter of an hour after that!
Regards,
Rob Philpott.

GeneralRe: Refactoring versus Performance Pin
OriginalGriff14-Jul-14 22:38
mveOriginalGriff14-Jul-14 22:38 
GeneralRe: Refactoring versus Performance Pin
Agent__00714-Jul-14 22:14
professionalAgent__00714-Jul-14 22:14 
GeneralRe: Refactoring versus Performance Pin
Rob Philpott14-Jul-14 22:18
Rob Philpott14-Jul-14 22:18 
GeneralRe: Refactoring versus Performance Pin
Agent__00714-Jul-14 22:24
professionalAgent__00714-Jul-14 22:24 
GeneralRe: Refactoring versus Performance Pin
Rob Philpott14-Jul-14 22:31
Rob Philpott14-Jul-14 22:31 
GeneralRe: Refactoring versus Performance Pin
Agent__00714-Jul-14 22:33
professionalAgent__00714-Jul-14 22:33 
AnswerRe: Refactoring versus Performance Pin
Pete O'Hanlon15-Jul-14 3:45
mvePete O'Hanlon15-Jul-14 3:45 
GeneralRe: Refactoring versus Performance Pin
Agent__00715-Jul-14 4:29
professionalAgent__00715-Jul-14 4:29 
GeneralRe: Refactoring versus Performance Pin
Pete O'Hanlon15-Jul-14 4:32
mvePete O'Hanlon15-Jul-14 4:32 
GeneralRe: Refactoring versus Performance Pin
Agent__00715-Jul-14 4:35
professionalAgent__00715-Jul-14 4:35 
AnswerRe: Refactoring versus Performance Pin
Joe Woodbury15-Jul-14 9:14
professionalJoe Woodbury15-Jul-14 9:14 

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.