> I understand the point on scaled up iterations. Your previous comment > makes me think the stack size is important. If it builds > to size O(n), the copying may introduce a factor of O(n^2).
Yes, if the stack size is O(n) then the time for the stack manipulation would be important. I would definitely consider O(n^2) not scaling up well, for n > moderately large. ----- Original Message ----- From: John Randall <[EMAIL PROTECTED]> Date: Thursday, November 20, 2008 16:46 Subject: Re: [Jprogramming] Project Euler Problem 216 To: Programming forum <[email protected]> > Roger Hui wrote: > > In this case front vs. back makes no difference because > > append-in-place does not support boxed arrays. > > Otherwise I would agree with you: making the > > end of the array the top of the stack would > > be the way to go. > > > I guess I knew boxed arrays were not supported, but forgot it > when it > counted. > > > As for scaling up, a stack size of 120 should not matter. > > 2e5 iterations should scale up too, if 2e5 iterations taking > > 2e5 times as long as 1 iteration is considered to be > > scaling up well. > > > > I understand the point on scaled up iterations. Your previous comment > makes me think the stack size is important. If it builds > to size O(n), > the copying may introduce a factor of O(n^2). > > By the way, I solved my premature promotion of integers problem: > I thought > I was running J64 when I was running J32. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
