Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add building simulator benchmark in Haskell #30

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tmcdonell
Copy link

This adds another comparison for the standard building simulator benchmark, this time in Haskell and using the ad library.

This was basically transliterated from the swift version with minimal changes applied.

These are the result that I get when running on my M1:

benchmarking primal
time                 25.69 μs   (25.57 μs .. 25.87 μs)
                     0.999 R²   (0.999 R² .. 1.000 R²)
mean                 25.80 μs   (25.64 μs .. 26.04 μs)
std dev              637.7 ns   (488.0 ns .. 787.5 ns)
variance introduced by outliers: 24% (moderately inflated)

benchmarking adjoint
time                 4.913 ms   (4.899 ms .. 4.927 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 4.915 ms   (4.900 ms .. 4.928 ms)
std dev              44.05 μs   (34.28 μs .. 70.07 μs)

@clackary
Copy link
Collaborator

clackary commented Oct 30, 2024

o0o0o I haven't worked with Haskell before.

Following the steps in the readme was not successful...

Error: cabal: Could not resolve dependencies:
[__0] trying: building-simulation-0.1.0.0 (user goal)
[__1] next goal: base (dependency of building-simulation)
[__1] rejecting: base-4.17.2.1/installed-4.17.2.1 (conflict:
building-simulation => base^>=4.20)
[__1] rejecting: base-4.20.0.1, base-4.20.0.0, base-4.19.2.0, base-4.19.1.0,
base-4.19.0.0, base-4.18.2.1, base-4.18.2.0, base-4.18.1.0, base-4.18.0.0,
base-4.17.2.1, base-4.17.2.0, base-4.17.1.0, base-4.17.0.0, base-4.16.4.0,
base-4.16.3.0, base-4.16.2.0, base-4.16.1.0, base-4.16.0.0, base-4.15.1.0,
base-4.15.0.0, base-4.14.3.0, base-4.14.2.0, base-4.14.1.0, base-4.14.0.0,
base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0,
base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__1] fail (backjumping, conflict set: base, building-simulation)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, building-simulation

Ah, I see. Looks like the recommended version is 4.17.2.1 and this depends on 4.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants