Skip to content

Commit

Permalink
notes cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jberryman committed Aug 22, 2012
1 parent a2ed6e5 commit e224c3e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
16 changes: 15 additions & 1 deletion Benchmark.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ import Control.Concurrent.Actors
import Control.Concurrent.Chan.Split
import TreeExample


-- THIS IS A WORK-IN-PROGRESS. PLEASE IGNORE. --


{- NOTES & IDEAS
look again at simple case expr for nil
look at eventlog with equal number inserts and queries (are queries very slow?)
look at bottom of heap profile, halfway through. Get that flat.
what about using forkOnIO to keep child actors on the same OS thread?
better way to handle recursion in Behavior?
unpacking MVars?
-}
-- put benchmarking & optimizing on hold until we can figure out how to get
-- consistent results....

Expand All @@ -31,7 +46,6 @@ main0 = defaultMain [
-- ]
]

-- 484:
main :: IO ()
main = testActors (2^10 - 1, 1000) >>= print

Expand Down
34 changes: 18 additions & 16 deletions Control/Concurrent/Actors.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -181,24 +181,26 @@ This module exports a simple, idiomatic implementation of the Actor Model.
TODO
-----

0.4
0.4.1
- performance tuning / benchmarking:
+ look at interface file: ghc -ddump-hi Control/Concurrent/Actors.hs -O -c
+ remove current PRAGMA
- close browser and everything, do a fake quick benchmark to get clock info
- be more controlled about the source lists (do once before defaultMain), use 'evaluate'
- run with +RTS -s and make sure everything is 0
- see if case-based nil is better
- try storing the same chan (observable sharing) in each node, and use for streaming
send an MVar with messages for the query operation
- get accurate baseline comparison between actors and set
- use INLINABLE
- test again with SPECIALIZE instead
- try adding INLINE to all with higher-order args (or higher-order newtype wrappers)
and make sure our LHS looks good for inlining
- specialize `Action i (Behavior i)` or allow lots of unfolding... ? Optimize those loops, somehow. Rewrite rules?
- first optimize TreeExample, by way of Benchmark.hs
- criterion and profiling w/r/t lib.:
- play with underlying Behavior Monad stack?
- be more controlled about the source lists (do once before defaultMain), use 'evaluate'
- run with +RTS -s and make sure everything is 0
- see if case-based nil is better
- try storing the same chan (observable sharing) in each node, and use for streaming
send an MVar with messages for the query operation
- get accurate baseline comparison between actors and set
- use INLINABLE
- test again with SPECIALIZE instead
- try adding INLINE to all with higher-order args (or higher-order newtype wrappers)
and make sure our LHS looks good for inlining
- specialize `Action i (Behavior i)` or allow lots of unfolding... ? Optimize those loops, somehow. Rewrite rules?
- look at "let floating" and INLINEABLE to get functions with "fully-applied (syntactically) LHS"
- split-chan ChItem in heap profile -hy
- take a look at threadscope for random tree test
- look at "let floating" and INLINEABLE to get functions with "fully-applied (syntactically) LHS"
- forkOnIO to keep communicating actors on same HEC?
- compare with previous version (cp to /tmp to use previous version)


Expand Down
2 changes: 0 additions & 2 deletions simple-actors.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ Description: simple-actors is an EDSL-style library for writing
.
- old @spawnReading@ removed
.
- performance improvements and benchmarks
.


-- The license under which the package is released.
Expand Down

0 comments on commit e224c3e

Please sign in to comment.