Skip to content

Fragment restructure#1

Merged
emilbjornlinger merged 16 commits into
dcs-chalmers:mainfrom
emilbjornlinger:fragment_restructure
Feb 5, 2026
Merged

Fragment restructure#1
emilbjornlinger merged 16 commits into
dcs-chalmers:mainfrom
emilbjornlinger:fragment_restructure

Conversation

@emilbjornlinger
Copy link
Copy Markdown
Collaborator

Restructure the repo to have different data structures and different parts of the benchmarking code for those data structures.

A new basic_priority_queue data structure has also been added.

The argument structure of the resulting binaries/CLI apps have also been reworked.

Some (most) descriptions of the README are now outdated. There is a new disclaimer that describes this.

Copy link
Copy Markdown
Contributor

@KvGeijer KvGeijer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I have added some comments. Here is just a summary of the comments.

The main thing I would like to have fixed is the arguments. Now you have to specify the data structure type for each run. However, the data structure is already known when you have selected an implementation, so selecting which one you want to run, and getting a panic if you select wrong, just seems a bit unnecessary.

Furthermore, I think it would be nice to change Queue to FifoQueue (or queue->fifo_queue) in some places. I leave this up to you how much to change. But it is a bit confusing if priority queues are covered by queue_benchmarks or not for example, as they also are queues.

Then we can further improve it by generalizing things, but maybe we can wait a few weeks with this until you are more comfortable with the code base.

Comment thread benchmark_core/src/benchmarks/test_helpers.rs
Comment thread benchmark_core/src/benchmarks/test_helpers.rs
Comment thread benchmark_core/src/benchmarks/queue_benchmarks.rs Outdated
Comment thread benchmark_core/src/traits.rs
Comment thread benchmark_core/src/arguments.rs Outdated
Comment thread benchmark_core/src/benchmarks/queue_benchmarks.rs Outdated
Comment thread benchmark_core/src/benchmarks/queue_benchmarks.rs Outdated
Comment thread benchmark_core/src/benchmarks/priority_queue_benchmarks.rs
@mvalline
Copy link
Copy Markdown
Collaborator

mvalline commented Feb 5, 2026

Looked over it as well, I agree with KvGeijer on how command parsing should be changed but otherwise I think everything is good!

@ellioth02
Copy link
Copy Markdown
Collaborator

Looked through it and it looks good 👍

  • I agree with @KvGeijer that making the command parsing less confusing with the removal of redundant arguments
    would be good using benchmark specific argument structs that utilize the general argument struct.
  • The restructuring of the files makes it more clear.

@KvGeijer
Copy link
Copy Markdown
Contributor

KvGeijer commented Feb 5, 2026

Looks good to me now. We can further simplify the creation of benchmarks for new data structures later, but this is a great starting point it seems like.

@emilbjornlinger emilbjornlinger merged commit b0fccae into dcs-chalmers:main Feb 5, 2026
1 check passed
KvGeijer pushed a commit that referenced this pull request Mar 9, 2026
* Updated gitignore for Linux, Windows, Mac temporary files

* Added basic rbfmem allocator without Drop

* RBFMEM: New Time Value with support for indicating when a thread is finished

* RBFMEM: Allocator frees its memory (including owned pointers) when it's safe.
Still global timestamp linked list is never freed.

* RBFMEM: Bug fix for timestamp free list in destructor

* RBFMEM: fix timestamping ensuring array will fit all thread timestamps

* RBFMEM: allocate initialized objects

* RBFMEM Basic Michael Scott Queue example

* RBFMEM: comments and more consistent style

* RBFMEM: Simplifying interfacing with allocator (always allocate memory as  a Box transformed into raw)

* RBFMEM: Basic test and restructure of Michael Scott Queue

* RBFMEM: iteratively dropping of free lists to prevent stack overflows from occurring

* RBFMEM: Public API for indicating to other threads when it is safe to reclaim memory (useful for read only threads)

* RBFMEM: Bug fix for memory leak when reusing memory

* RBFMEM: fix unclear docstrings

* RBFMEM: the free method is now properly marked as unsafe, since the programmer needs to meet some safety conditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants