Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 2 Forum
Date: Sun Sep 23 2001 8:39 pm
Author: Chow, Jicai Jonathan <jchow@andrew.cmu.edu>
Subject: Re: Vector(0,1) or Vector(max,0) ??

I did experiment with it and found that Vector(100,100)is significantly faster than Vector(0,1). I suppose the rate at which the Vector increases its capacity is more significant.

And strangely, using one for loop did not really make a differnce.

Even stranger, I have a friend who used a nested for loop AND one more for loop, and still have a program that runs just as fast as the solution.



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