|
|
back to boardCommon BoardTo ALL: Unfair for Pascal programmers to compete with C++/C I spent two days on tweaking my code for Problem 1532 First I wrote the solution in Pascal, which solves at 0.687 sec. And I rewrite the same algo in C++/C, it gives 0.32 sec http://acm.timus.ru/status.aspx?author=46914&status=accepted So I guess the Free Pascal does not turn on {$Optimization 2}, Please, Admins, could you kindly check? and if I use "goto" in FreePascal, I will get a "Compiler (Fail)" How do I enable "goto"? I tried "{$GOTO ON}" but it does not work... anyway.. finally, my ranking for Problem 1532 has reached the second... I am happy... http://acm.timus.ru/rating.aspx?space=1&num=1532 Edited by author 11.12.2011 20:58Re: To ALL: Unfair for Pascal programmers to compete with C++/C Why do you think the same algo in C/C++ and Pascal should produce similar result in terms of time? Even if all optimizations would be enabled that doesn't mean these compilers optimizers are equally smart. If you are concerned about such imbalance just install exactly the same compilers as online judge uses, compile your programs with exactly the same options and compare assembler listings of both programs. And only if you prove the sensible difference between {$Optimization 2} and current pascal switches you may say "Unfair for Pascal programmers to compete with C++/C". I met opposite situation in 1001: the same algo gives 0.046 in pascal and 0.14 in C++. What really makes me mad is that this C++ solution required only 0.062 in 2007 :-O > if I use "goto" in FreePascal, I will get a "Compiler (Fail)" How do I enable "goto"? > I tried "{$GOTO ON}" but it does not work... You may email admins and ask them add this info into FAQ. Re: To ALL: Unfair for Pascal programmers to compete with C++/C Thanks... I will look into this... |
|
|