Please don't make me be the only one to post test cases or I will take my ball and go home ;-)
Just a reminder: You can get bonus points added to your Master problem entry score by participating in each problem's forum. Earn 5 points for each forum post, up to a maximum of 25 points per problem. The forum points can make a difference in your final entry score. So, take advantage of this for this last Master levelproblem.
Hi 1. are two commands per line allowed? like: var a=1; var b=2; 2. can a command be split betwene the lines? var a= 123; I hope the answer is NO in both cases Cheers Jakub
output(1 / 0);
What should the program output ?
NaN ? Error ?
can variable name be some key word like this :
These I designed to test that parallelism does not break inter-statement dependencies. For the attached "chain2.txt", output should be: 0.1333333333 1.0000000000 0.1333333333 2.0000000000 0.1333333333 3.0000000000 0.1333333333 4.0000000000 0.1333333333 5.0000000000 0.1333333333 6.0000000000 0.1333333333 7.0000000000 0.1333333333 8.0000000000 0.1333333333 9.0000000000 0.1333333333 10.0000000000 For the attached "chain3.txt", the output should be: 200.0000000000 400.0000000000 600.0000000000 800.0000000000 1000.0000000000 1200.0000000000 1400.0000000000 1600.0000000000 1800.0000000000
We have been hashing the expression evaluation order as to right-to-left versis left-to-right for some time in other threads with the apparent "official" position as being right-to-left.
I would like to point out then an apparent inconsistancy with this rule (I say apparent because the results were not stated but are implied).
In the description for string operators (concatination) you have
var strConcat = str1 + str2 + str3;
The output for this was not shown, but I would imagine everyone expects the output to be:
Has anyone tried to parallelize the problem with explicit inter-statment dependencies worked into the parallelism? I've pondered and pondered, but I can't seem to find a model that is simple enough to produce any speedup except in very specialized cases (like a whole slew of output() statements).
My first timings are available. My test is to replicate the attached input 500,000 times for a 765MB file (30.5 million statements). Time on an i7-2600 is about 8 seconds on first run, 4 seconds on second run (after input was cached by OS). Disclaimer: i7-2600 is a very fast CPU.
Attached are some samples and the results I produce. Please compare and comment. john