
-----------------------------------
chopperdudes
Tue Feb 03, 2009 9:17 pm

different computation time for different languages, compensate?
-----------------------------------
I'm going to be doing CCC, junior this year, however i've been doing a few senior exercises with bigger test cases.  the language i'm most proficient at is turing.  But one thing i've found out is, turing runs rather slowly, for example:

using jgrasp, a 9999 x 9999 for loop with 1 variable assignment each time takes 0.134 seconds on my machine,
the same operation, with turing, takes over 38 seconds.

i know in junior it wouldn't really matter, but just wondering, do you get adjustment for those problems with time limits for different languages? O.o

-----------------------------------
Tony
Tue Feb 03, 2009 10:47 pm

RE:different computation time for different languages, compensate?
-----------------------------------
The first stage is marked by your teacher, who gets instruction package from Waterloo. Your teacher would best be able to answer that question. I think it might be more a matter of "runs in reasonable time".

-----------------------------------
SJ
Sat Feb 07, 2009 7:23 pm

RE:different computation time for different languages, compensate?
-----------------------------------
we all use java in my school. my teacher says that 30 seconds is borderline acceptable. a minute at most if it's a special scenario. but honestly most cases won't require more than a second. i'm sure your teacher will be a fair judge.

but wow, i'm a little surprised there, ~a million operations takes 38 seconds in turing? and i thought java was slow...

-----------------------------------
DemonWasp
Sat Feb 07, 2009 10:35 pm

RE:different computation time for different languages, compensate?
-----------------------------------
Java isn't slow. Turing, however, is quite slow.

JavaScript is worst of all.

-----------------------------------
Insectoid
Sun Feb 08, 2009 5:33 am

RE:different computation time for different languages, compensate?
-----------------------------------
I notice that perl is rather slow as well, compared to ruby. What took half a second in ruby took half a minute in perl. Perhaps perl is just slow at type conversion, which was used extensively in my friends version of my base converter.

-----------------------------------
wtd
Sun Feb 08, 2009 1:45 pm

RE:different computation time for different languages, compensate?
-----------------------------------
Show both your Ruby and Perl code.  It's possible you were not using idiomatic Perl.

-----------------------------------
Tony
Sun Feb 08, 2009 2:36 pm

Re: different computation time for different languages, compensate?
-----------------------------------
I am also somewhat suspicious of
a 9999 x 9999 for loop with 1 variable assignment each time takes 0.134 seconds on my machine
are you sure that such is being done? It sounds like something that a compiler should remove, for doing redundant work.

-----------------------------------
Analysis Mode
Mon Feb 23, 2009 11:42 pm

Re: different computation time for different languages, compensate?
-----------------------------------
For USACO contests, Java users are compensated by a time factor of, i can't remember, 2.0?  they are slower.

-----------------------------------
DanielG
Tue Feb 24, 2009 9:40 pm

RE:different computation time for different languages, compensate?
-----------------------------------
CCC purposely give one minute so that as long as you use the right algorithm, it runs in any language (yes, it does give advantages to fast languages for cases where you use slower algorithms).

-----------------------------------
Analysis Mode
Tue Feb 24, 2009 9:42 pm

Re: different computation time for different languages, compensate?
-----------------------------------
well for the first problem, the time limit is definitely  not 1 minute.

For S4 and S5, the time limit is indeed 1 minute.

-----------------------------------
DanielG
Tue Feb 24, 2009 9:44 pm

RE:different computation time for different languages, compensate?
-----------------------------------
actually, you can probably have them run in under a second (I know how to do it for both 4 and 5 [though I didn't know it during the contest]), for at least C++ and other relatively fast languages.
