Skip to content

Instantly share code, notes, and snippets.

@rapiz1
Last active March 1, 2023 12:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rapiz1/a4bc437f8960081a5be1495d50c96a37 to your computer and use it in GitHub Desktop.
Save rapiz1/a4bc437f8960081a5be1495d50c96a37 to your computer and use it in GitHub Desktop.
GSoC 2020 Sequential Data Structures

Chapel - Sequential Data Structures

Google Summer of Code, 2020

Yujia Qiao

Huazhong University of Science and Technology

Email: rapiz3142@gmail.com


Organization: CHAPEL

Project: Sequential Data Structures

img

Index

  1. Introduction
  2. Modules
    1. Heap
    2. Vector
    3. OrderedSet
    4. OrderedMap
    5. UnrolledLinkedList
  3. Outcome of contributions
  4. Code Contribution
  5. Further Work

Introduction

This project is aimed at adding various useful data structures missing in Chapel, including Heap, Treap, Vector, UnrolledLinkedList.

Modules

Heap

A heap is a specialized tree-based data structure that supports extracting the maximal or the minimal element quickly, which can serve as a priority queue.

Status: Merged into standard modules via chapel#15997.

Documentation: Heap Module

Vector

Vector called here is a list storing elements in contiguous memory area. Note that Chapel already has List but it's slower to index a List.

Status: Merged into /test/library via chapel#16048

Documentation: In code. No public web page available.

OrderedSet

An orderedSet is a collection of unique and ordered elements, thus supporting more operations like lowerBound than Set.

Status: Merged into package modules via chapel#16124

Documentation: OrderedSet Module

OrderedMap

An orderedMap is a container that stores key-value associations. OrderedSet supports searching for a certain key, insertion, and deletion in O(logN). The main difference between Map is that it has a different time complexity and space usage.

Status: Pull request open

UnrolledLinkedList

Implementation Reference

An unrolled linked list is a linked list of small arrays, all of the same size where each is so small that the insertion or deletion is fast and quick, but large enough to fill the cache line.

Status: Pull request open

Outcome of contributions

  • Designed and implemented various modules
    • Implementation
    • Documentation
    • Unit Tests
  • Discussed and implemented a prototype for parameterizing different structures in one type.
  • Reported bugs encountered while developing
  • Notes on DS

Code Contribution

~5k lines merged and ~3k lines pending

Documentation

Further Work

  • Get open PR merged
  • Add performance tests and fix anything that impacts performance unexpectedly.
  • Move Vector out of test, possibly when constraint generics is available in Chapel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment