Giter Site home page Giter Site logo

pthariensflame / discrimination.rs Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 0.0 23 KB

Generic worst-case-linear-time sorting and partitioning algorithms based on discriminators

Home Page: https://crates.io/crates/discrimination

License: Apache License 2.0

Rust 100.00%
crates discriminator partitioning-algorithms sorting rust-language

discrimination.rs's Introduction

discrimination.rs's People

Contributors

pthariensflame avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discrimination.rs's Issues

On adapting discrimination to Rust

Having previously drafted a library for generic discrimination in Rust, I can probably offer some comments.

(I will edit this later. Meanwhile, you may want to skim my comment on r/rust โ€“ although it is not very detailed when it comes to actual implementation choices.

To begin with, a note: the performance of order discriminators is primarily determined by the speed of the sorting routine used for the base order (NatO in the paper), and by how much overhead you incur when applying that sorting routine with a given ordering relation; analogously, equivalence discriminators are more or less dependent on the data structure that backs the grouping operation.

In more concrete terms, the half-bucket, half-radix sorting routine presented in the paper works well for illustrative purposes, but I failed to achieve reasonable perfomance when sorting types with relatively complex ordering relations. I would recommend starting directly with a real radix sort on Natural, and defer sorting of all fixed-size types to it. With regard to overhead caused by orderings, my ideas are still fairly nebulous and remain unimplemented (as I planned to work on them during the upcoming holidays), so it is perhaps too early to offer sound advice.

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.