|
-
Jan 14th, 2003, 06:09 PM
#1
Thread Starter
yay gay
Which one is faster?
i remember to see in a topic i think that this first piece of code would be faster than the second one:
PHP Code:
System.Deviantart.Implementation t = this.devImplementation;
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(t.MaskAlpha, t.MaskRed, t.MaskGreen, t.MaskBlue)), 0, 0, this.Width, this.Height);
second:
Code:
System.Deviantart.Implementation t = this.devImplementation;
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(this.DevImplementation.MaskAlpha, this.DevImplementation.MaskRed, this.DevImplementation.MaskGreen, this.DevImplementation.MaskBlue)), 0, 0, this.Width, this.Height);
Last edited by PT Exorcist; Jan 14th, 2003 at 06:14 PM.
\m/  \m/
-
Jan 15th, 2003, 10:33 AM
#2
Assuming MaskAlpha etc. are constants there should be exactly zero difference in the byte code.
If this.devImplementation is a real field and not a property and the masks are runtime values then there should be zero difference too (except if the compiler is VERY stupid, but I can't imagine that).
But if this.devImplementation is a property (with get and set) and the masks are runtime values then the first is faster.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 15th, 2003, 04:37 PM
#3
Thread Starter
yay gay
both devImplementation and Mask things are proprieties! so the first one should be faster right?
\m/  \m/
-
Jan 15th, 2003, 06:17 PM
#4
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 15th, 2003, 06:21 PM
#5
Thread Starter
yay gay
ah tks nice
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|