Click here to Skip to main content
15,889,858 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 17:40
naveen_bij1-Mar-09 17:40 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 20:59
N a v a n e e t h1-Mar-09 20:59 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 21:30
naveen_bij1-Mar-09 21:30 
GeneralRe: Reading the registry once and storing the values Pin
N a v a n e e t h1-Mar-09 21:57
N a v a n e e t h1-Mar-09 21:57 
GeneralRe: Reading the registry once and storing the values Pin
naveen_bij1-Mar-09 22:17
naveen_bij1-Mar-09 22:17 
QuestionAfter CLR conversion debugging is slow. Pin
KASR126-Feb-09 17:25
KASR126-Feb-09 17:25 
AnswerRe: After CLR conversion debugging is slow. Pin
Mark Salsbery27-Feb-09 6:24
Mark Salsbery27-Feb-09 6:24 
AnswerRe: After CLR conversion debugging is slow. Pin
Luc Pattyn27-Feb-09 7:02
sitebuilderLuc Pattyn27-Feb-09 7:02 
Hi,

some simple manual code optimization may (or may not) solve such problems. Here is a typical example (using C# syntax):
Bitmap bm=new Bitmap(otherBitmap);
for (int x=0; x< bm.Width; x++) {
    for (int y=0; y< bm.Height; y++) {
        // do something with or to pixel(x,y)
    }
}


in debug mode bm.Height will be evaluated for each and every pixel, possibly costing more CPU cycles than the actual pixel operation. Replace the above by:

Bitmap bm=new Bitmap(otherBitmap);
int height=bm.Height;
for (int x=0; x< bm.Width; x++) {
    for (int y=0; y< height; y++) {
        // do something with or to pixel(x,y)
    }
}


and it will run much faster in debug.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


Questionifstream & ofstream manipulators equivalents in C++/CLI Pin
J_E_D_I26-Feb-09 1:19
J_E_D_I26-Feb-09 1:19 
AnswerRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
N a v a n e e t h26-Feb-09 3:42
N a v a n e e t h26-Feb-09 3:42 
GeneralRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
J_E_D_I27-Feb-09 10:03
J_E_D_I27-Feb-09 10:03 
GeneralRe: ifstream & ofstream manipulators equivalents in C++/CLI Pin
N a v a n e e t h1-Mar-09 13:25
N a v a n e e t h1-Mar-09 13:25 
QuestionWhen prefer to write managed C++ code ? Pin
Yanshof25-Feb-09 11:46
Yanshof25-Feb-09 11:46 
AnswerRe: When prefer to write managed C++ code ? Pin
Mark Salsbery25-Feb-09 14:30
Mark Salsbery25-Feb-09 14:30 
AnswerRe: When prefer to write managed C++ code ? Pin
N a v a n e e t h25-Feb-09 14:40
N a v a n e e t h25-Feb-09 14:40 
QuestionBoolean property causing crash Pin
Andy____________uk24-Feb-09 1:35
Andy____________uk24-Feb-09 1:35 
GeneralRe: Boolean property causing crash Pin
Luc Pattyn24-Feb-09 1:42
sitebuilderLuc Pattyn24-Feb-09 1:42 
GeneralRe: Boolean property causing crash Pin
Andy____________uk24-Feb-09 2:01
Andy____________uk24-Feb-09 2:01 
GeneralRe: Boolean property causing crash Pin
Luc Pattyn24-Feb-09 2:33
sitebuilderLuc Pattyn24-Feb-09 2:33 
GeneralRe: Boolean property causing crash Pin
Andy____________uk24-Feb-09 3:01
Andy____________uk24-Feb-09 3:01 
QuestionConverting int to string confusion Pin
TabascoSauce23-Feb-09 15:33
TabascoSauce23-Feb-09 15:33 
GeneralRe: Converting int to string confusion Pin
Luc Pattyn23-Feb-09 16:07
sitebuilderLuc Pattyn23-Feb-09 16:07 
QuestionC++/CLI -- Where to declare pre-selected list box and radio button attributes? Pin
J_E_D_I22-Feb-09 7:53
J_E_D_I22-Feb-09 7:53 
AnswerRe: C++/CLI -- Where to declare pre-selected list box and radio button attributes? Pin
Mark Salsbery22-Feb-09 18:22
Mark Salsbery22-Feb-09 18:22 
GeneralRe: C++/CLI -- Where to declare pre-selected list box and radio button attributes? Pin
J_E_D_I23-Feb-09 9:49
J_E_D_I23-Feb-09 9:49 

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.