Re: Thread status constants

2014-07-21 Thread Kyle Van Berendonck
Hi Simon, I have been inspecting what gcc generates and found that in all the functions I checked which used the thread status in a switch, none of them generated jump tables, rather, long chains of cmp's. I predict this is because there are overlapping cases (or even a fall-through in one I saw,

Re: Thread status constants

2014-07-21 Thread Simon Marlow
On 19/07/2014 06:00, Kyle Van Berendonck wrote: I found these: https://github.com/ghc/ghc/blob/5f3c5384df59717ca8013c5df8d1f65692867825/includes/rts/Constants.h#L194 They go only 0-14, so there's some long chains of branches and stuff in hot paths that could be cleaned up into single &-masked br

Re: Thread status constants

2014-07-19 Thread Kyle Van Berendonck
20, 2014 at 4:43 AM, Jost Berthold < berth...@mathematik.uni-marburg.de> wrote: > Message: 2 >> Date: Sat, 19 Jul 2014 15:00:17 +1000 >> From: Kyle Van Berendonck >> To: "ghc-devs@haskell.org" >> Subject: Thread status constants >> Message-ID: >

Re: Thread status constants

2014-07-19 Thread Jost Berthold
Message: 2 Date: Sat, 19 Jul 2014 15:00:17 +1000 From: Kyle Van Berendonck To: "ghc-devs@haskell.org" Subject: Thread status constants Message-ID: Content-Type: text/plain; charset="utf-8" Hi,

Re: Thread status constants

2014-07-19 Thread Carter Schonwald
hc-devs@haskell.org" >> Subject: Thread status constants >> Message-ID: >> > ebyds...@mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi, >> >> I found these: >> https://github.com/ghc/ghc/blob/5f3c5384

Re: Thread status constants

2014-07-19 Thread Jost Berthold
Message: 2 Date: Sat, 19 Jul 2014 15:00:17 +1000 From: Kyle Van Berendonck To: "ghc-devs@haskell.org" Subject: Thread status constants Message-ID: Content-Type: text/plain; charset="utf-8" Hi, I found these: https://github.com/ghc/ghc/blob/5f3c5384df59717ca801

Thread status constants

2014-07-18 Thread Kyle Van Berendonck
Hi, I found these: https://github.com/ghc/ghc/blob/5f3c5384df59717ca8013c5df8d1f65692867825/includes/rts/Constants.h#L194 They go only 0-14, so there's some long chains of branches and stuff in hot paths that could be cleaned up into single &-masked branches by changing these into a set of flags.