[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Dynamisk alloceret arrays



On Sat, 7 Aug 1999, Sune Fischer wrote:

> 
> 
> --- Per Vognsen <sslug@sslug> wrote:
> > Thomas M. wrote:
> > [snip]
> > >  Er der en mulighed for at lave dynamisk
> > allocerede arrays, således at de
> > > kan vokse, når der bliver brug for det?
> 
> Det kan lade sig gøre som omtalt i de andre indlæg, men det er min
> erfaring at den slags koster tid. Hvis det er noget der skal gøres
> meget ofte, fx inde i en loop, vil jeg kraftigt anbefale at du finder
> en anden løsning. Eksempelvis prøver at estimere den maksimale
> størrelse på arrayet funktionen får brug for, og malloc'er i
> begyndelsen (og free'er i slutningen!).
> Det er bedre at spilde en MB og så få et program der kører 10 fold
> hurtigere efter min mening.

 Hastigheden har ikke noget at sige, da den alligevel skal vente på bruger
input hele tiden. Desuden er det i 'klumper' de nye data kommer til, altså
noget lign. : 

 genre="rock"
 <vente på bruger skal browse lidt i nogle menuer>
 and artist="Metallica"
 <vente på bruger skal browse i lidt flere menuer>
 and album="Load"

Thomas Mørch
licensed ham, with callsign OZ2AFO. License category: CEPT-1

If God had intended man to smoke He would have set him on fire.



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *