Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ICFP 2002 Programming Contest Write-up?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: olczyk@i...
Subject: Re: [Caml-list] ICFP 2002 Programming Contest Write-up?
On Fri, 11 Oct 2002 01:15:06 -0400 (21.882 UMT), John Prevost
<j.prevost@cs.cmu.edu> wrote:

>>>>>> "es" == eijiro sumii <eijiro_sumii@anet.ne.jp> writes:
>
>    es>  - On the other hand, the CPU times are quite different: we
>    es> are more than 70 times faster!  This is surprising
>    es> enough---even though speed was not a goal in the task and even
>    es> though the CPU times may be somewhat imprecise as the judges
>    es> say---considering the other entry is written in (raw) C.
>
>Well, I took a look at the 2nd-place C program a bit--it's *designed*
>to use as much CPU time as possible, up to the limit.  Whenever it has
>time left over after planning, it uses that left over time to improve
>its map of the world.  Apparently in the default setup, it will always
>take very near to one full CPU second per move.
>
>That might explain the "CPU-hungry" nature of the entry, even though
>it's written in C.
>
This is not a good strategy. The rules say that it is averabe time for
moves that counts. So it doesn't matter when you do the calculation.
If you need something precaculated then you should do it at the
beginning, if you don't need it imeadiately, then you should delay
calculating until you need it. This saves CPU time.




















































-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners