Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 2 Forum
Date: Sun Sep 23 2001 7:08 pm
Author: Tomes, Justin Daniel <jtomes@andrew.cmu.edu>
Subject: Vector(0,1) or Vector(max,0) ??

Does anyone know if initializing the Vector to size 0 and the capacityIncrement to 1, so that it automatically increases its size to hold each element, is slower than initializing it to the size expected and then putting all the elements in? I thought that could be the cause of the slowness in my loops, but I can't get it to work the second way, so I thought I'd ask if it'll even make a difference. I have a feeling I should've turned this in when it was working...
Post response

Go to the previous messageGo to the following message
Current Thread Detail:
Speed      Tomes, Justin Daniel      Sun Sep 23 2001 12:20 pm       
Re: Speed      Agarwal, Aditya      Sun Sep 23 2001 5:05 pm       
Re: Speed      Lee, Charles C.      Sun Sep 23 2001 6:28 pm       
Vector(0,1) or Vector(max,0) ??      Tomes, Justin Daniel      Sun Sep 23 2001 7:08 pm       
Re: Vector(0,1) or Vector(...      Chow, Jicai Jonathan      Sun Sep 23 2001 8:39 pm       
Re: Vector(0,1) or Vector(...      Lee, Peter      Mon Sep 24 2001 9:23 am       

Back to previous screen