Click here to Skip to main content
16,011,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaldetecting working and non-working links in a website Pin
2-Jul-02 8:50
suss2-Jul-02 8:50 
GeneralRe: detecting working and non-working links in a website Pin
2-Jul-02 10:46
suss2-Jul-02 10:46 
GeneralMDAC 2.7 problems. Please HELP. Pin
DimkaSPB2-Jul-02 8:10
DimkaSPB2-Jul-02 8:10 
Generalbitmap writing problem Pin
SilentWarrior2-Jul-02 6:55
SilentWarrior2-Jul-02 6:55 
GeneralRe: bitmap writing problem Pin
Davide Pizzolato2-Jul-02 7:07
Davide Pizzolato2-Jul-02 7:07 
GeneralRe: bitmap writing problem Pin
Speedy3-Jul-02 11:04
Speedy3-Jul-02 11:04 
GeneralPreallocate a map Pin
2-Jul-02 6:49
suss2-Jul-02 6:49 
GeneralRe: Preallocate a map Pin
Joaquín M López Muñoz2-Jul-02 11:01
Joaquín M López Muñoz2-Jul-02 11:01 
Are you building your maps top-down (first As, then Bs, finally Cs) or bottom-up? The latter order is likely to be way faster, since Bs and Cs store copies of the enclosed types. So, instead of writing
A a;
B b;
//insert stuff into a
b["Hello"]=a;
you should write
B b;
A& a=b["Hello"]; //note the & to access directly b["Hello"] instead of create a copy
//insert stuff into a
Other ways to improve your code:
  • Define B as a map<CString,A*> (and similarly wih C) to prevent excessive copying. If this imposes a problem with keeping track of the objects (to do the final cleanup), consider some ref-counted smart pointer instead.
  • Give my block allocator a try (though I wouldn't expect but a modest improvement thru its use.)Good luck.

    Joaquín M López Muñoz
    Telefónica, Investigación y Desarrollo

  • GeneralRe: Preallocate a map Pin
    markkuk2-Jul-02 21:23
    markkuk2-Jul-02 21:23 
    GeneralRe: Preallocate a map Pin
    Alexandru Savescu2-Jul-02 22:49
    Alexandru Savescu2-Jul-02 22:49 
    Generalview2 will not show when selected from file/new Pin
    ns2-Jul-02 6:02
    ns2-Jul-02 6:02 
    GeneralAssigning a member variable... Pin
    RuiSantiago2-Jul-02 5:53
    RuiSantiago2-Jul-02 5:53 
    GeneralRe: Assigning a member variable... Pin
    RuiSantiago2-Jul-02 6:14
    RuiSantiago2-Jul-02 6:14 
    GeneralClass Wizard Visual C++ 6.0 (DAO) can not recognize MS Access 2000 format Pin
    2-Jul-02 5:28
    suss2-Jul-02 5:28 
    GeneralRe: Class Wizard Visual C++ 6.0 (DAO) can not recognize MS Access 2000 format Pin
    #realJSOP2-Jul-02 6:27
    professional#realJSOP2-Jul-02 6:27 
    Generalreceiving messages in mdi Pin
    ns2-Jul-02 5:27
    ns2-Jul-02 5:27 
    GeneralRe: receiving messages in mdi Pin
    Mike Nordell2-Jul-02 8:01
    Mike Nordell2-Jul-02 8:01 
    GeneralNewbie to Direct3D question Pin
    Joel Holdsworth2-Jul-02 5:24
    Joel Holdsworth2-Jul-02 5:24 
    GeneralRe: Newbie to Direct3D question Pin
    Mike Nordell2-Jul-02 8:05
    Mike Nordell2-Jul-02 8:05 
    Generalanother mdi question Pin
    ns2-Jul-02 5:09
    ns2-Jul-02 5:09 
    Generalhaving trouble creating two docs for a CFormView MDI Pin
    ns2-Jul-02 4:39
    ns2-Jul-02 4:39 
    GeneralRe: having trouble creating two docs for a CFormView MDI Pin
    Chris Losinger2-Jul-02 4:41
    professionalChris Losinger2-Jul-02 4:41 
    GeneralRe: having trouble creating two docs for a CFormView MDI Pin
    ns2-Jul-02 4:53
    ns2-Jul-02 4:53 

    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.