Day 7: Remove DeepSeq.force
Fascinatingly makes this day slower—by quite a bit.
This commit is contained in:
parent
5175f95da0
commit
12c6450ce8
|
@ -2,7 +2,6 @@ import Data.List.Split
|
|||
import qualified Data.List as L
|
||||
import Data.Vector as V
|
||||
import Data.Char
|
||||
import Control.DeepSeq as DeepSeq
|
||||
|
||||
data OutAction = Continue | Output | Halt deriving (Enum, Eq, Show)
|
||||
data Mode = Position | Immediate | Relative deriving (Enum, Eq, Show)
|
||||
|
@ -67,7 +66,7 @@ step opvec ((t,p),input,output) = case op of
|
|||
where (op,m) = getOpModes opvec
|
||||
params = paramChange m opvec t
|
||||
tm_binop x = new_tm t ((params ! 0) `x` (params ! 1))
|
||||
new_tm t x = DeepSeq.force (t // [(V.last opvec, x)],p)
|
||||
new_tm t x = (t // [(V.last opvec, x)],p)
|
||||
|
||||
execSteps :: (TuringMachine, [Int], [Int], OutAction) -> (TuringMachine, [Int], [Int], OutAction)
|
||||
execSteps ((t,p),input,output,halt) =
|
||||
|
|
Loading…
Reference in New Issue
Block a user