Click here to Skip to main content
15,920,030 members
Home / Discussions / C#
   

C#

 
AnswerRe: select from DataBase Pin
Paul Conrad27-Jul-07 19:44
professionalPaul Conrad27-Jul-07 19:44 
QuestionSelecte max(Feild)from Pin
Thaer Hamael27-Jul-07 17:58
Thaer Hamael27-Jul-07 17:58 
AnswerRe: Selecte max(Feild)from Pin
Paul Conrad27-Jul-07 19:44
professionalPaul Conrad27-Jul-07 19:44 
QuestionPointers Performance Pin
Leslie Sanford27-Jul-07 16:53
Leslie Sanford27-Jul-07 16:53 
AnswerRe: Pointers Performance Pin
J. Dunlap27-Jul-07 17:37
J. Dunlap27-Jul-07 17:37 
AnswerRe: Pointers Performance Pin
Luc Pattyn27-Jul-07 17:50
sitebuilderLuc Pattyn27-Jul-07 17:50 
GeneralRe: Pointers Performance Pin
Leslie Sanford27-Jul-07 18:39
Leslie Sanford27-Jul-07 18:39 
AnswerRe: Pointers Performance Pin
Guffa27-Jul-07 22:13
Guffa27-Jul-07 22:13 
Of course you are getting the same result. You are using a pointer to an array, which will produce the exact same code as using a reference to an array.

Try using the pointer directly instead:

for(int i = 0; i < Size; i++) {
   p++ = 1.0f;
}

That should be a bit faster, as it doesn't produce any code to check the boundary of the array.

You should include the fixed structure inside the timing to make a fair comparison, as that is needed for the pointer operation. You should also test different sizes, to see how the code scales.

---
single minded; short sighted; long gone;

GeneralRe: Pointers Performance Pin
Leslie Sanford28-Jul-07 5:27
Leslie Sanford28-Jul-07 5:27 
GeneralRe: Pointers Performance [modified] Pin
Robert Surtees28-Jul-07 6:34
Robert Surtees28-Jul-07 6:34 
GeneralRe: Pointers Performance Pin
Leslie Sanford28-Jul-07 7:55
Leslie Sanford28-Jul-07 7:55 
GeneralRe: Pointers Performance Pin
Guffa28-Jul-07 9:33
Guffa28-Jul-07 9:33 
GeneralRe: Pointers Performance Pin
Robert Surtees28-Jul-07 10:58
Robert Surtees28-Jul-07 10:58 
AnswerRe: Pointers Performance Pin
Guffa28-Jul-07 13:37
Guffa28-Jul-07 13:37 
AnswerMessage formatting question (expires on sunday) Pin
Luc Pattyn27-Jul-07 23:34
sitebuilderLuc Pattyn27-Jul-07 23:34 
GeneralRe: Message formatting question (expires on sunday) Pin
Leslie Sanford28-Jul-07 5:35
Leslie Sanford28-Jul-07 5:35 
GeneralRe: Message formatting question (expires on sunday) Pin
Luc Pattyn28-Jul-07 5:44
sitebuilderLuc Pattyn28-Jul-07 5:44 
GeneralRe: Message formatting question (expires on sunday) Pin
Leslie Sanford28-Jul-07 5:46
Leslie Sanford28-Jul-07 5:46 
GeneralRe: Message formatting question (expires on sunday) Pin
Luc Pattyn28-Jul-07 5:54
sitebuilderLuc Pattyn28-Jul-07 5:54 
GeneralRe: Message formatting question (expires on sunday) Pin
Leslie Sanford28-Jul-07 6:18
Leslie Sanford28-Jul-07 6:18 
GeneralRe: Message formatting question (expires on sunday) Pin
Luc Pattyn28-Jul-07 7:15
sitebuilderLuc Pattyn28-Jul-07 7:15 
QuestionInterActive javaScripte With Combobox html control Pin
Thaer Hamael27-Jul-07 15:53
Thaer Hamael27-Jul-07 15:53 
AnswerRe: InterActive javaScripte With Combobox html control Pin
Christian Graus27-Jul-07 16:54
protectorChristian Graus27-Jul-07 16:54 
Questionmigrating C to C# Pin
abstarsss27-Jul-07 14:00
abstarsss27-Jul-07 14:00 
AnswerRe: migrating C to C# Pin
Luc Pattyn27-Jul-07 14:19
sitebuilderLuc Pattyn27-Jul-07 14:19 

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.