#5925: Add inline version of newArray#
-------------------------------------+------------------------------------
Reporter: tibbe | Owner: simonmar
Type: feature request | Status: patch
Priority: normal | Milestone: 7.6.2
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By: 4258
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by tibbe):
Replying to [comment:21 simonmar]:
> Thanks, I started refactoring this yesterday. I want to move the
knowledge about the array layout into `SMRep` (where the other heap-
representation stuff is) as well as sharing the heap allocation code.
Great. If you refactor the code I wrote, make sure you get the latest
patch as I fixed some bugs. The `newArray#` code now validates (haven't
validated the `newByteArray#` version yet).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5925#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#5925: Add inline version of newArray#
-------------------------------------+------------------------------------
Reporter: tibbe | Owner: simonmar
Type: feature request | Status: patch
Priority: normal | Milestone: 7.6.2
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By: 4258
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by simonmar):
Thanks, I started refactoring this yesterday. I want to move the
knowledge about the array layout into `SMRep` (where the other heap-
representation stuff is) as well as sharing the heap allocation code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5925#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7478: setSessionDynFlags does not always work
-------------------------------------+------------------------------------
Reporter: edsko | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: ghc-api/T7478 | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by bennofs):
Replying to [comment:11 MikolajKonarski]:
> BTW, right now (I don't know how it was before) calling
`setSessionDynFlags` causes significant memory leaks, visible already in
tests with a couple hundred modules and calls. If anybody is interested, I
can try to extract a test from my code that uses GHC API, but it's GHC
version dependent, etc., so I'd rather not do it until anybody is actively
looking at this. But it's straightforward: basically, in a loop:
>
> {{{
> setSessionDynFlags flags
> setTargets yetAnotherSIngleModule
> load LoadAllTargets
> }}}
>
>
>
> Even if we load 100 of modules and then just keep reloading the same
module, memory will increase all the time.
I can confirm this. I have a workaround for that problem in
https://github.com/bennofs/ghc-
server/blob/master/src/Server/Configure.hs#L117, which suggests that the
problem is with reloading the package database.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7478#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#8863: ghc 7.6.3: type parser accepts => as -> (sometimes)
--------------------------+------------------------------------------------
Reporter: | Owner:
patrikj | Status: new
Type: bug | Milestone:
Priority: normal | Version: 7.6.3
Component: | Operating System: Linux
Compiler | Type of failure: GHC accepts invalid program
Keywords: | Test Case:
Architecture: x86_64 | Blocking:
(amd64) |
Difficulty: |
Unknown |
Blocked By: |
Related Tickets: |
--------------------------+------------------------------------------------
The following examples are all parsed and type checked even though they
don't seem to be conforming to the Haskell standard syntax:
a :: Int => Int
a = (1+)
b :: a -> a => a
b = const
c :: Num a => [a => a => a]
c = [(+)]
Slight variations fail (as the should) - for example
b' :: a -> b => a
b' = const
/Patrik
----
Linux cse-814009 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8863>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#5925: Add inline version of newArray#
-------------------------------------+------------------------------------
Reporter: tibbe | Owner: simonmar
Type: feature request | Status: new
Priority: normal | Milestone: 7.6.2
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By: 4258
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Changes (by tibbe):
* owner: => simonmar
Comment:
Simon, if you could point out any opportunities to break out code from
`doNewArrayOp` into reusable allocation primitives that would be great.
After this patch I want to support inline allocation in the clone array
family of primops, so the more reusable the pieces are the better the code
will look.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5925#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#5925: Add inline version of newArray#
-------------------------------------+------------------------------------
Reporter: tibbe | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.6.2
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By: 4258
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by tibbe):
I have something that works. I will post a patch later tonight.
Benchmark: allocating 100,000,000 `MutableArray# ()` of size 16 in a loop.
Best out of three runs for old implementation:
{{{
$ time ./NewArraySlow
real 0m2.741s
user 0m2.696s
sys 0m0.043s
}}}
Best out of three runs for new implementation:
{{{
$ time ./NewArrayNew
real 0m1.490s
user 0m1.449s
sys 0m0.041s
}}}
That's almost 2x faster.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5925#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler