Adding support for CLDouble

2010-01-09 Thread Denys Rtveliashvili
it. Or, perhaps, I am missing something? 3. http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/Registers mentions that there are registers for floats and doubles. What should be done about long doubles then? With kind regards and hope that gurus may shed some light on the above, Denys

FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-13 Thread Denys Rtveliashvili
and, perhaps, a few other trivial operations. I understand that it is not safe to allocate large blocks on the stack. But we could possibly have a function similar to alloca which would allocate small blocks on stack and would use the alloca for big ones. With kind regards, Denys Rtveliashvili

Re: FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-15 Thread Denys Rtveliashvili
While alloca is not as cheap as, say, C's alloca, you should find that it is much quicker than C's malloc. I'm sure there's room for optimisation if it's critical for you. There may well be low-hanging fruit: take a look at the Core for alloca. The problem with using the stack is that

Re: FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-18 Thread Denys Rtveliashvili
and gain a performance improvement? The only reason that comes to my mind is the size of code, but actually the resulting code looks very small and neat. With kind regards, Denys Rtveliashvili ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

Re: FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-22 Thread Denys Rtveliashvili
it be shared with the rest of the world then instead of being local to TSO? On the side note, is London HUG still active? The website seems to be down... With kind regards, Denys Rtveliashvili Adding an INLINE pragma is the right thing for alloca and similar functions. alloca is a small

Re: FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-22 Thread Denys Rtveliashvili
into it. With kind regards, Denys Rtveliashvili ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-23 Thread Denys Rtveliashvili
to a place where stg_upd_frame_info is generated? I can't find it in *.c, *.cmm or *.hs and guess it is something very special. With kind regards, Denys Rtveliashvili ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org

Re: FFI calls: is it possible to allocate a small memory block on a stack?

2010-04-23 Thread Denys Rtveliashvili
regards, Denys Rtveliashvili Denys Rtveliashvili wrote: OK, the code I have checked out from the repository contains this in rts/sm/Storage.h: [global pinned_object_block variable] Odd. This was changed in ghc head by a patch dating Dec 1st 2009: Tue Dec 1 17:03:21 CET 2009 Simon Marlow

Re: laziness in `length'

2010-06-15 Thread Denys Rtveliashvili
Hi Daniel, Thank you very much for the explanation of this issue. While I understand the parts about rewrite rules and the big thunk, it is still not clear why it is the way it is. Please could you explain which Nums are not strict? The ones I am aware about are all strict. Also, why doesn't

performance issues in simple arithmetic code

2011-04-27 Thread Denys Rtveliashvili
or a/4 for the same reason. With kind regards, Denys Rtveliashvili ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: performance issues in simple arithmetic code

2011-04-28 Thread Denys Rtveliashvili
what does it do * knowing more about its internals With kind regards, Denys Rtveliashvili ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users