Code Monkey home page Code Monkey logo

Comments (2)

aspiwack avatar aspiwack commented on July 29, 2024

The reason for this is simple: linear-base has existed for longer than -XUnliftedDatatypes.

I haven't thought of what it would take to have better support for unlifted datatypes. What would you like to see?

PS: does the difference in performance persists if you use foldl' instead of foldl in the lifted case?

from linear-base.

yaitskov avatar yaitskov commented on July 29, 2024

foldl' does better than just foldl, but the unlifted version keeps the lead.

benchmarking Fold Lifted Prime/Left
time                 48.69 μs   (48.18 μs .. 49.43 μs)
                     0.998 R²   (0.997 R² .. 0.999 R²)
mean                 48.32 μs   (47.86 μs .. 49.13 μs)
std dev              1.773 μs   (1.192 μs .. 2.662 μs)
variance introduced by outliers: 39% (moderately inflated)

benchmarking Fold Unlifted/Left
time                 11.47 μs   (11.25 μs .. 11.70 μs)
                     0.997 R²   (0.995 R² .. 0.999 R²)
mean                 11.48 μs   (11.34 μs .. 11.78 μs)
std dev              672.5 ns   (467.2 ns .. 1.016 μs)
variance introduced by outliers: 68% (severely inflated)

Both Unlifted and Linear features are elephants. It is logical they started in separated sandboxes, but eventually they should merge gradually. I would start with redefining basic classes such Show, Ord etc one by one in linear-base or reimporting from Unboxed.

from linear-base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.