This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is the average latency as measured by a single trial run of 100K ping/pongs with several different transports. | |
PingTCP: 7.34s >80%CPU | |
PingTCPTransport: 19s ~60%CPU | |
PingPipes: 6.36s >=100%CPU | |
The machine is a 3.1 ghz Intel Westmere (Dell workstation) running RHEL 6.2. | |
The PingTCP is a baseline that uses the raw Network.Socket interface rather than the Network.Transport abstraction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes, GeneralizedNewtypeDeriving, CPP #-} | |
import Data.Vector.Mutable as MV | |
import qualified Data.Vector as V -- ((!), freeze) | |
import Control.Monad.ST | |
import Control.Monad.Primitive | |
import Prelude hiding (read) | |
type Splitter a = a -> (a,a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> module Main where | |
How to write hybrid CPU/GPU programs with Haskell | |
------------------------------------------------- | |
What's better than programming a GPU with a high-level, | |
Haskell-embedded DSL (domain-specific-language)? Well, perhaps | |
writing portable CPU/GPU programs that utilize both pieces of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Complex | |
-- This should be the biggest representable double: | |
big :: Double | |
big = 1.7976931348623157e308 | |
-- This uses OCaml's approach at overflow-avoidance: | |
mag :: Complex Double -> Double | |
mag (x:+y) = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE CPP #-} | |
-- Naive translation of shen_anova1_batch.m into Accelerate. | |
module Main (main) where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified System.IO.Streams as S | |
import System.IO.Streams.Concurrent | |
import Control.Concurrent | |
import Data.IORef | |
import Data.ByteString.Char8 as B | |
main = do | |
cnt <- newIORef 0 | |
s1 <- S.makeInputStream $ do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat > minimal.hs | |
import HSBencher | |
main = defaultMainWithBechmarks | |
[ mkBenchmark "bench1/bench1.cabal" ["1000"] $ | |
Or [ Set NoMeaning (RuntimeParam "+RTS -qa -RTS") | |
, Set NoMeaning (RuntimeEnv "HELLO" "yes") ] ] | |
$ runghc minimal.hs | |
* Executing: hostname -s --> 1 line(s) | |
* Executing: git name-rev --name-only HEAD --> 1 line(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -f *.o *.hi bugged.exe unbugged.exe | |
rm -rf ./bugged_dumps ./unbugged_dumps/ | |
ghc -DACTIVATE_BUG -keep-tmp-files -dsuppress-module-prefixes -ddump-to-file -ddump-core-stats -ddump-simpl-stats -dcore-lint -dcmm-lint -ddump-ds -ddump-simpl -ddump-stg -ddump-asm -ddump-bcos -ddump-cmm -ddump-opt-cmm -ddump-inlinings -rtsopts -fforce-recomp -O2 -threaded PBBS.hs -main-is Util.PBBS.t4 -o bugged.exe | |
[1 of 1] Compiling Util.PBBS ( PBBS.hs, PBBS.o ) | |
Inlining done: D:NFData{v r4f} [gid[DataConWrapper]] | |
Inlining done: D:NFData{v r4f} [gid[DataConWrapper]] | |
Inlining done: D:NFData{v r4f} [gid[DataConWrapper]] | |
Inlining done: D:NFData{v r4f} [gid[DataConWrapper]] | |
Inlining done: D:NFData{v r4f} [gid[DataConWrapper]] | |
Inlining done: D:NFData{v r4f} [gid[DataConWrapper]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result size of Tidy Core = {terms: 423, types: 423, coercions: 39} | |
lvl_r2uH :: [GHC.Types.Char] | |
[GblId, Str=DmdType] | |
lvl_r2uH = GHC.CString.unpackCString# "Got it!" | |
Rec { | |
Main.$sinsert_$s$sgo6 [Occ=LoopBreaker] | |
:: forall a1_X12s. | |
GHC.Prim.Int# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative | |
import Control.Monad | |
import Control.DeepSeq | |
import Control.Exception | |
import GHC.Stats | |
import qualified Data.Map.Strict as M | |
import Data.Time.Clock | |
import Data.Monoid | |
import System.Mem |
OlderNewer