Click here to Skip to main content
15,917,971 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Pointers Performance Pin
Leslie Sanford28-Jul-07 5:27
Leslie Sanford28-Jul-07 5:27 
Guffa wrote:
p++ = 1.0f;


Unfortunately, that doesn't compile. I have to do this:

fixed(float* pSource = data)
{                            
    float* p = pSource;
 
    for(int i = 0; i < Size; i++)
    {
        *p = 1.0f;
        p++;
    }
}


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


My tests show that the above is slower than using the subscript operator on the pointer; the array method beats it out. I assume it's because incrementing the pointer is taking additional time.
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 
AnswerRe: migrating C to C# Pin
Christian Graus27-Jul-07 14:25
protectorChristian Graus27-Jul-07 14:25 

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.