Article View: fr.comp.os.ms-windows.programmation
Article #93Re: Que peux-t-on mettre dans une DLL ?
From: Falk Tannhäuser
Date: Thu, 30 Jul 2009 20:09
Date: Thu, 30 Jul 2009 20:09
20 lines
2362 bytes
2362 bytes
James Kanze schrieb: > On Jul 30, 12:27 am, Falk Tannh�user <tannhauser86549s...@free.fr> >> // Find global character statistics and key length >> std::map<unsigned char, unsigned> stat; > > Seulement curiosit�, mais est-ce qu'il y a une raison pour > std::map, plut�t que : > std::vector< unsigned > stat( UCHAR_MAX + 1 ) : > (ce que j'aurais fait). En fin de compte, ton � indice �, c'est > bien un petit entier non-n�gatif, ce qui correspond � > l'utilisation classique de vector (voire m�me un tableau de type C Non, pas de raison particuli�re, sauf que je n'avais pas envie de me prendre le choux :-) La version avec std::vector ou tableau doit bien �tre plus performant (moins d'allocations dynamiques, temps d'acc�s O(1) contrairement � O(log N) pour std::map) et prendre moins de m�moire, mais vu la faible quantit� de donn�es � traiter la diff�rence reste imperceptible. Falk
Technical Details
Message-ID:
<4a71fdfd$0$27785$426a74cc@news.free.fr>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp12-1.free.fr!not-for-mailReferences:
<4a414044$0$27809$426a74cc@news.free.fr> <4a41dfa0$0$12660$ba4acef3@news.orange.fr> <4a41e381$0$17074$ba4acef3@news.orange.fr> <h1tl7d$h5o$1@shakotay.alphanet.ch> <4a473818$0$12615$ba4acef3@news.orange.fr> <h28qcu$r8p$1@shakotay.alphanet.ch> <4a48874c$0$12636$ba4acef3@news.orange.fr> <4a66b6b5$0$414$426a34cc@news.free.fr> <4a670f87$0$12628$ba4acef3@news.orange.fr> <4a70ccca$0$413$426a74cc@news.free.fr> <ea8cbbe2-5b3a-4101-8bb3-95478d89aebc@26g2000yqk.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp12-1.free.fr!not-for-mail Date: Thu, 30 Jul 2009 22:09:32 +0200 From: Falk Tannhäuser <tannhauser86549spam@free.fr> User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 Newsgroups: fr.comp.os.ms-windows.programmation,fr.comp.lang.c++ Subject: Re: Que peux-t-on mettre dans une DLL ? References: <4a414044$0$27809$426a74cc@news.free.fr> <4a41dfa0$0$12660$ba4acef3@news.orange.fr> <4a41e381$0$17074$ba4acef3@news.orange.fr> <h1tl7d$h5o$1@shakotay.alphanet.ch> <4a473818$0$12615$ba4acef3@news.orange.fr> <h28qcu$r8p$1@shakotay.alphanet.ch> <4a48874c$0$12636$ba4acef3@news.orange.fr> <4a66b6b5$0$414$426a34cc@news.free.fr> <4a670f87$0$12628$ba4acef3@news.orange.fr> <4a70ccca$0$413$426a74cc@news.free.fr> <ea8cbbe2-5b3a-4101-8bb3-95478d89aebc@26g2000yqk.googlegroups.com> In-Reply-To: <ea8cbbe2-5b3a-4101-8bb3-95478d89aebc@26g2000yqk.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Lines: 20 Message-ID: <4a71fdfd$0$27785$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 30 Jul 2009 22:09:33 MEST NNTP-Posting-Host: 82.67.111.135 X-Trace: 1248984573 news-1.free.fr 27785 82.67.111.135:2063 X-Complaints-To: abuse@proxad.net