What if someone asks for some specific bug in their code to be fixed. For
example lets say someone is writing an overloaded< operator. Would it be
okay to make a suggestion of code change if it is just syntax. (i.e.: they
are missing a const or don't need the & before operator).
Thanks for the clarification,
Josh
----- Original Message -----
From: "Peter Jay Salzman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 12:12 AM
Subject: Re: [vox-tech] can you run it faster for my 110 program?
> hate to be a poopy, but i just wanted to comment that there's a delicate
> balance between help and unfair help.
>
> this was ok; but we have a lot of new users on vox who have joined in the
> past 2 weeks. i wanted to point out to them that if you want help with
> homework, use common sense:
>
> 1. clearly identify the request for help as being school related
> 2. no collaborative effort on code
> 3. vague terms and concepts are ok. concrete code is not.
>
> this is for lugod's safety, as well as the poster's.
>
> again, this was absolutely fine; it just seemed like a good opportunity
> to state vox's position on homework help for the new users.
>
> pete
>
>
>
> begin: Chan Yan Huang <[EMAIL PROTECTED]> quote
> > it is due now and thanx you guys , basically you guys suggest me not use
> > heap, so i change it
> > to a 2-dimension array which use stack, but the running time is just
faster
> > very very little. it is due
> > now . thanx for help anyway,
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of -/\/\/\- (Mister
> > Resistor)
> > Sent: Thursday, June 07, 2001 10:56 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [vox-tech] can you run it faster for my 110 program?
> >
> >
> >
> > Your performance penalty is probably coming from the fact that you're
> > allocating data on the heap within a loop that you want to execute fast.
> > You should also avoid the stream I/O in the loop. That's another
> > performance penalty. What is the source of the data?
> >
> > Try a different strategy. I.e, read all the input into some sort of
> > buffer, then efficiently compute in one fell-swoop your memory
> > requirements and allocate it all at once. Then, construct your data
> > structures within the allocated memory region, and avoid the use of the
> > 'new' operator if you can help it... This should speed things up a
little.
> >
> > I don't know the context in which this code is executing, otherwise I
> > could help you further. Feel free to e-mail. When's the deadline?
> > Looking at "weights and vertexes", I am thinking you're trying to tackle
> > some graph algorithm problem of sorts.
> >
> > What's the target platform? We can optimize this right down to the
lowest
> > level, after, of course, we optimize your algorithms too.
> >
> > First things first - save your current work, so you have a fall back if
> > your optimization efforts fail.
> >
> > --
> > Pavan Tumati ([EMAIL PROTECTED]) http://www.students.uiuc.edu/~tumati
> > Computer Engineering Student University of Illinois @
Urbana-Champaign
> >
> > Intel VP David House, In _EE_Times_, 16 October 1989: "Bill Gates says
> > no matter how much more power we can supply, he'll develop some really
> > exciting software that will bring the machine to its knees."
> >
> > On Thu, 7 Jun 2001, Chan Yan Huang wrote:
> >
> > >
> > > this part running painfully slow. its correct but if i handin this i
will
> > > lose all the pts in cpu speed contest
> > > that's about 30 % of program of my grade. open for suggestion it is
> > > basically initialize a double pointer to
> > > take input. but it is tooo ooo slow , my instructor sean give zero
for
> > > that. and i can't think any improvement
> > > . help man !!!!!!
> > >
> > > istream & operator>> (istream &in, Grid &grid)
> > > {
> > > int x,edgesNum;
> > >
> > > int i = 0 ;
> > > while (in >> x)
> > > {
> > > in >> edgesNum; //the number of edges 1-5
> > > grid.Vertices[x]->EdgeSize = edgesNum;
> > > (grid.Vertices[x])->edges = new Edge *[edgesNum]; //2 nd edges
is
> > > while ( i<edgesNum)
> > > {
> > > grid.Vertices[x]->edges[i] = new Edge();
> > > in >> grid.Vertices[x]->edges[i]->ToVertax;
> > > in >> grid.Vertices[x]->edges[i]->Weight;
> > > grid.Vertices[x]->edges[i]->FromVertax = x;
> > > i++;
> > > }
> > >
> > > i = 0;
> > > //might need a getline to go to next line for input
> > > }
> > > return in;
> > > } // operator>>
> > >
> >
>
> --
> "The following addresses had permanent fatal errors..." [EMAIL PROTECTED]
> -- Mailer Daemon
www.dirac.org/p
>