Click here to Skip to main content
15,899,825 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Deque's question Pin
Christian Graus28-Aug-02 13:24
protectorChristian Graus28-Aug-02 13:24 
GeneralSTL: keep order for map Pin
peterchen27-Aug-02 19:38
peterchen27-Aug-02 19:38 
GeneralRe: STL: keep order for map Pin
Todd Smith27-Aug-02 20:06
Todd Smith27-Aug-02 20:06 
GeneralRe: STL: keep order for map Pin
peterchen27-Aug-02 20:59
peterchen27-Aug-02 20:59 
GeneralRe: STL: keep order for map Pin
Todd Smith27-Aug-02 21:13
Todd Smith27-Aug-02 21:13 
GeneralRe: STL: keep order for map Pin
peterchen27-Aug-02 21:49
peterchen27-Aug-02 21:49 
GeneralRe: STL: keep order for map Pin
Joaquín M López Muñoz28-Aug-02 12:26
Joaquín M López Muñoz28-Aug-02 12:26 
GeneralRe: STL: keep order for map Pin
peterchen28-Aug-02 12:53
peterchen28-Aug-02 12:53 
thanks for the suggestion, but I need both string-based lookup, and iteration in (temporal) order of insertion (although your class keeps the info, it would about O(n*n) to actually iterate in "sorted by count" order)

I'll go with the list<> implementation and a linear search, and make some speed comparisons.

[edit]
some interesting results (not all to much surprising)

times only for lookup
with <= 10 strings, the list is faster, for 25 strings it's list is about factor 2 slower, factor 3 for 50. (map looses early for creation of a std::string from literal when doing the lookup, and additional comparison for equality)

Having said that, With 25 strings in a list I get ca. 200.000 accesses / second on my 1.3GHz box, not astonishing, but fast enough for most uses.

All this is just lookup, map insertion is of course much slower due to additional comparisons (and I might be stuck with thousands of inserts and just a few lookups), so list implementation is "perfect enough"



One day I might find it quite amusing how touching tongues make life so confusing  Anne Clark again   [sighist]
GeneralATL server exe and event interface Pin
_elli_26-Aug-02 23:14
_elli_26-Aug-02 23:14 
GeneralDeque Pin
danag26-Aug-02 11:32
danag26-Aug-02 11:32 
GeneralRe: Deque Pin
danag26-Aug-02 12:14
danag26-Aug-02 12:14 
GeneralWindows service in ATL Pin
rajeev25-Aug-02 20:31
rajeev25-Aug-02 20:31 
GeneralRe: Windows service in ATL Pin
Vagif Abilov31-Aug-02 21:20
professionalVagif Abilov31-Aug-02 21:20 
QuestionDrag & Drop into a CWindowImpl? Pin
clintsinger23-Aug-02 12:43
clintsinger23-Aug-02 12:43 
AnswerRe: Drag & Drop into a CWindowImpl? Pin
Michael Dunn25-Aug-02 21:34
sitebuilderMichael Dunn25-Aug-02 21:34 
GeneralWTL FormBased APP with AX Pin
obt23-Aug-02 11:26
obt23-Aug-02 11:26 
GeneralProperty Sheet Wizard Pin
mango_lier22-Aug-02 9:42
mango_lier22-Aug-02 9:42 
GeneralCreateThread / CloseHandle cleanly Pin
Paul Farry22-Aug-02 5:14
professionalPaul Farry22-Aug-02 5:14 
GeneralRe: CreateThread / CloseHandle cleanly Pin
_Magnus_22-Aug-02 5:18
_Magnus_22-Aug-02 5:18 
GeneralRe: CreateThread / CloseHandle cleanly Pin
Paul Farry22-Aug-02 5:29
professionalPaul Farry22-Aug-02 5:29 
Generalset compiler error Pin
_Magnus_22-Aug-02 3:43
_Magnus_22-Aug-02 3:43 
GeneralRe: set compiler error Pin
Michael Dunn25-Aug-02 21:32
sitebuilderMichael Dunn25-Aug-02 21:32 
GeneralSTL Container of classes Pin
[James Pullicino]21-Aug-02 21:39
[James Pullicino]21-Aug-02 21:39 
GeneralRe: STL Container of classes Pin
Anonymous21-Aug-02 22:07
Anonymous21-Aug-02 22:07 
GeneralRe: STL Container of classes Pin
Neville Franks21-Aug-02 22:40
Neville Franks21-Aug-02 22:40 

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.