[Haskell-beginners] Performance of Idiomatic lazy Haskell

Henk-Jan van Tuyl hjgtuyl at chello.nl
Mon Feb 1 18:05:58 EST 2010


unxutils.zip seems to be gone; another option would be, to use MinGW/MSYS.  
You need this anyway for installing several Haskell packages that bind to  
C-software. If you start an MS-DOS shell and give command "sh", you are in  
a unixlike shell, where you can give the "time" command.

Regards,
Henk-Jan van Tuyl


--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--



On Mon, 01 Feb 2010 20:15:25 +0100, Tim Perry <perry2of5 at yahoo.com> wrote:

> CygWin would be a good option.
>
> Here are some other ideas:
>
> There is a timeit.exe utility in the Windows Server downloads which is  
> supposed to be similar to unix's time command. Try the links here
> http://channel9.msdn.com/forums/Coffeehouse/258979-Windows-equivalent-of-UnixLinux-time-command/
>
> Windows does support piping. It is similar to bash with 2>&1 to redirect  
> stderr to stdout and stuff.
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true
>
> The new windows shell is almost a real shell. Almost.
>
> If you don't have that, then this port of unix utilities makes an XP box  
> tolerable.
> http://unxutils.sourceforge.net/
>
> Hope that helps.
> --Tim
>
>
>
> ----- Original Message ----
> From: Daniel Fischer <daniel.is.fischer at web.de>
> To: Markus Böhm <markus.boehm at googlemail.com>
> Cc: beginners at haskell.org
> Sent: Mon, February 1, 2010 6:40:52 AM
> Subject: Re: [Haskell-beginners] Performance of Idiomatic lazy Haskell
>
> Am Montag 01 Februar 2010 15:22:45 schrieb Markus Böhm:
>
>> Daniel, I use GHC 6.12.1 and Windows XP.
>
> *sigh*
>
> Have you a CygWin installed? It should run as given from a CygWin shell,  
> I
> believe.
>
>> The time command doesn't seem
>> to work. It says in German: specified time can't be read. Give a new
>> time.
>
> Replace "time" with however you get the CPU time used by a process on
> Windows.
> But I think Windows doesn't allow piping, and I'm not sure whether it has
> echo, so see below.
>
>> Daniel, here another feedback:
>>
>> F:\MeineUebungen>ghc -O2 -fexcess-precision -fvia-C -optc-O3 -o luaLoop
>> --make p 085-pi_lualoop.hs
>> [1 of 1] Compiling Main             ( p085-pi_lualoop.hs,
>> p085-pi_lualoop.o ) Linking luaLoop.exe ...
>>
>> F:\MeineUebungen>echo '0.00000001' | time ./luaLoop
>> Eingegebene Zeit kann nicht übernommen werden.
>> Geben Sie die neue Zeit ein:
>>
>> F:\MeineUebungen>luaLoop +RTS -sstderr -RTS
>> luaLoop +RTS -sstderr
>> EPS:
>> 0.00000001
>> 3.1415926485894725
>>           61,428 bytes allocated in the heap
>>            1,316 bytes copied during GC
>>            4,564 bytes maximum residency (1 sample(s))
>>           11,820 bytes maximum slop
>>                1 MB total memory in use (0 MB lost due to fragmentation)
>>
>>   Generation 0:     0 collections,     0 parallel,  0.00s,  0.00s
>> elapsed Generation 1:     1 collections,     0 parallel,  0.00s,  0.00s
>> elapsed
>>
>>   INIT  time    0.02s  (  0.00s elapsed)
>>   MUT   time    8.06s  ( 16.83s elapsed)
>>   GC    time    0.00s  (  0.00s elapsed)
>>   EXIT  time    0.00s  (  0.00s elapsed)
>>   Total time    8.08s  ( 16.83s elapsed)
>>
>>   %GC time       0.0%  (0.0% elapsed)
>>
>>   Alloc rate    7,604 bytes per MUT second
>>
>>   Productivity  99.8% of total user, 47.9% of total elapsed
>
> What?????
>
> Please try the following:
>
> 1) hardcode eps = 1e-8 in the source (or get it via getArgs and pass it  
> as
> a command line argument)
> 2) ghc -O2 -fforce-recomp -fexcess-precision -fvia-C -optc-O3 -o cloop --
> make Source.hs
> 3) ghc -O2 -fforce-recomp -o nloop --make Source.hs
> 4) cloop +RTS -sstderr
> 5) nloop +RTS -sstderr
>
>>
>> -- Markus
>>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners


-- 


More information about the Beginners mailing list