Giter Club home page Giter Club logo

rdf-canonize-rs's People

Contributors

gannan08 avatar mattcollier avatar

Watchers

 avatar  avatar  avatar

rdf-canonize-rs's Issues

Merge Event Breakdown

TLDR; hash_first_degree_quads is a good target for optmizations. I'll be doing another breakdown for that function.

124 micros for single iteration inside the test harness

90 micros

https://github.com/gannan08/rdf-canonize-rust/blob/main/src/urdna2015.rs#L58-L97

3 micros

https://github.com/gannan08/rdf-canonize-rust/blob/main/src/urdna2015.rs#L61-L68

82 micros

https://github.com/gannan08/rdf-canonize-rust/blob/main/src/urdna2015.rs#L83-L89

Multiple passes through hash_first_degree_quads looks like this (don't mind the rounding)

https://github.com/gannan08/rdf-canonize-rust/blob/main/src/urdna2015.rs#L246-L340

FIRST_DEGREE_QUADS_1 39
FIRST_DEGREE_QUADS_1 61
FIRST_DEGREE_QUADS_1 1
FIRST_DEGREE_QUADS_1 6
FIRST_DEGREE_QUADS_1 1
FIRST_DEGREE_QUADS_1 10

4 micros

https://github.com/gannan08/rdf-canonize-rust/blob/main/src/urdna2015.rs#L98-L119

6 micros

https://github.com/gannan08/rdf-canonize-rust/blob/main/src/urdna2015.rs#L174-L236

Bench and slow operation

First, I want to make sure you're aware of this branch and its capabilities:

https://github.com/gannan08/rdf-canonize-rust/blob/1d2b3b250c3efc7a2e4e5043115b107dfb489a35/benches/README.md#L11-L12

Secondly, by adding timers and an accumulator, I have discovered that 2/3 of the time spent doing test044_canonize is in this one function:

https://github.com/gannan08/rdf-canonize-rust/blob/1d2b3b250c3efc7a2e4e5043115b107dfb489a35/src/urdna2015.rs#L302-L303

Presently, total runtime is approx 3ms for that test, and 1.95ms of that time is spent in create_hash_to_related.

The amazing thing is, that 24 hours ago a test iteration was 9-10ms!

I've been journaling progress here: https://app.gitbook.com/@digitalbazaar/s/rust/v/master/rdf-canonize-optimizations

Prepare Transfer

  • Clean up commits
  • Change License to BSD-3
    - [ ] Get final regex code into main
  • Update README.md

Nice!

Looks like we just need to wire what you have here into this: https://github.com/mattcollier/rust-node-bindgen-canonize/blob/9aecb5646dfcbc2d633495a5b09fdfa712cece15/src/lib.rs#L79-L80

I've tested this and it will accept the inputs from rdf-canonize tests.

You just need nj-cli to build the bindgen-canonize stuff: https://github.com/infinyon/node-bindgen#cli-installation

// within the rust-node-bindgen-canonize folder
nj-cli build
const rustCanonize = require('../../rust-bindgen-canonize/dist/index.node');

// in the rdf-canonize test suite
result = canonize.canonize.apply(null, clone(jsParams));

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.