Git Product home page Git Product logo

cssl's People

Contributors

flippingbits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cssl's Issues

Test cases

I have ported this to Java. This may or may not be worthwhile since it's not possible to explicitly vectorise the search for the end key in searchRange, but measuring the performance will be interesting nonetheless.

Do you have some test cases that verify the data structure's correctness? I would like to use these as sanity checks for my port.

Segfault on sparse lists

The function below segfaults, but works fine with dense lists (my compiler is gcc 7.2.0, OS Windows). Please confirm if you can reproduce this or if I have done something silly.

#include <stdio.h>
#include <string.h>
#include "skiplist.h"

void sanity_test() {
  _CSSL_SkipList* slist = createSkipList(9, 5);
  for (int i = 0; i < 100000; i += 1000) {
    insertElement(slist, i);
  }
  _CSSL_RangeSearchResult result = searchRange(slist, 500, 2500);
  printf("Result = %d", result.count);
  printf("First = %d", result.start->key);
  printf("Last = %d", result.end->key);
}

Adding every hundredth integer to the skip list produces an incorrect number of matches (0, 20 expected), but does not segfault.

Alignment

I noticed the range search uses unaligned vector loads. It would be interesting to see how much better the performance is with aligned fast lanes (allowing the use of _mm256_load_si256 instead of _mm256_loadu_si256).

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.