Skip to content

Commit

Permalink
significant performance increases with strictness
Browse files Browse the repository at this point in the history
  • Loading branch information
nevrome committed Sep 5, 2021
1 parent 99f00d5 commit 279f6e8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- V 0.14.0: Introduced strictness, which brought a significant increase in performance. See the discussion here: https://old.reddit.com/r/haskell/comments/picjy6/how_could_i_improve_the_performance_of_my/
- V 0.13.0: Major rewrite with the vector library - includes multiple bugfixes, but is surprisingly slow
- V 0.12.0: Renamed some core functions
- V 0.11.0: Made calibration curve interpolation optional and turned it off by default
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,5 @@ before rerunning the procedure above.
```
stack build --profile
stack exec --profile -- currycarbon "1000,200;2000,200;3000,200;4000,200;5000,200;6000,200;7000,200;8000,200" -q --densityFile /dev/null +RTS -p
stack exec -- currycarbon "1000,200;2000,200;3000,200;4000,200;5000,200;6000,200;7000,200;8000,200" -q --densityFile /dev/null +RTS -s
```
2 changes: 1 addition & 1 deletion currycarbon.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: currycarbon
version: 0.13.0
version: 0.14.0
synopsis: A package for simple, fast radiocarbon calibration
description: Radiocarbon calibration with the intercept method optimised for fast calibration of many dates.
license: MIT
Expand Down
7 changes: 7 additions & 0 deletions playground/test.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ bchron |> dplyr::left_join(
geom_point(aes(x = calBCAD, y = value, colour = method),
size = 1, alpha = 0.5)

### large test (for memory leaks)

calpal <- c14bazAAR::get_calpal()
calpal |> dplyr::select(c14age, c14std) |> readr::write_csv("/tmp/currycarbon_large_input_test.csv", col_names = F)

#currycarbon --inputFile /tmp/currycarbon_large_input_test.csv -q --densityFile /dev/null

2 changes: 2 additions & 0 deletions src/Currycarbon/Calibration.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{-# LANGUAGE Strict #-}

module Currycarbon.Calibration
( -- * Calibration functions
--
Expand Down
2 changes: 2 additions & 0 deletions src/Currycarbon/Types.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{-# LANGUAGE StrictData #-}

module Currycarbon.Types where

import qualified Data.Vector.Unboxed as VU
Expand Down

0 comments on commit 279f6e8

Please sign in to comment.