Skip to main content

All Questions

3 votes
2 answers
87 views

Optimize a C++ Multithreaded Program for Processing Large POSTFIX .tar Files

The program processes files within a large POSTFIX .tar archive using a multithreaded approach, where a worker pool processes files in parallel. It maps the .tar file into memory, distributes the file ...
Lewis Trem's user avatar
2 votes
2 answers
112 views

A thread-safe performant Money Transfer API in Java

This is a popular interview question. It is meant to be done within 30 minutes. The task is to implement a thread-safe performant Bank Account API that allows to transfer, deposit, withdraw and check ...
Sasha Shpota's user avatar
3 votes
1 answer
96 views

Multithread execution times are slow on Ubuntu and fast on Windows

I'm working on a project accelerating the execution of a Genetic Algorithm both on multiple cores and on a GPU. The algorithm is specifically suited for the solution of the Traveling Salesman Problem ...
Pietro Pianigiani's user avatar
7 votes
1 answer
283 views

Multithreading message queue system

For an application I'm developing, I need an system which allows a thread to submit messages to another thread. For this purpose I designed a message queue system with the following features. Any ...
Sam Coutteau's user avatar
2 votes
2 answers
222 views

Circular Queue Producer Consumer with Mutex and Condition Variable vs. Sempahore

How can I optimize the performance of the code below? Destruction of the condition variable at the end of main blocks, not sure why this behavior is occurring. Is it possible to remove some of the ...
Darnoc Eloc's user avatar
3 votes
1 answer
118 views

Multi producer/consumer lock-free queue

I would be grateful if you could review my code for a multi producer/consumer lock-free queue in C++. I am mainly after performance improvements, but all input is welcome. ...
Mr. Orange's user avatar
5 votes
3 answers
2k views

An exercise in Data Oriented Design & Multi Threading in C++

Been working in games development professionally now for about ~5 years, but have only been doing OOP & haven't worked with multi threading before as I'm mostly a gameplay programmer, I've also ...
larssonmartin's user avatar
0 votes
2 answers
149 views

Web scraping spider

I'm currently working on my first web scraping project and I need to scrape a lot of websites. With my current code it takes more than a day but for my project I need to scan the same websites every 5 ...
Max's user avatar
  • 17
1 vote
1 answer
381 views

Multithreaded O_DIRECT file read-and-process program

Here is my code. It reads a file and returns the sum of all the bytes in the file: ...
1f604's user avatar
  • 113
1 vote
0 answers
79 views

A parallel MSD radix sort in Java for integer keys

I have this repository: https://github.com/coderodde/ParallelRadixSort.java/tree/main It contains a parallel MSD radix sort presented below: ...
coderodde's user avatar
  • 29.8k
4 votes
2 answers
2k views

Multi-threading Class in C++

I wrote a C++ class which can take a vector of functions and their respective arguments and execute them in parallel and return a vector of results from its respective functions. ...
Darth-CodeX's user avatar
4 votes
1 answer
619 views

Multithreading a shortest path algorithm

I would like to modify my shortest path finding code to use multithreading and improve its performance. The algorithm must be able to work with negative weights, and as a result, we cannot use ...
c.leblanc's user avatar
  • 263
2 votes
1 answer
151 views

DFS Maze Solver

I am new to Rust Programming so I decided to implement a Maze Solver using DFS. I was wondering if there is any way to optimize this code further ...
Ben's user avatar
  • 21
0 votes
1 answer
150 views

Training a Reinforcement Learning algorithm

Problem: I'm trying to reduce the computation time and optimize specific functions of a Reinforcement Learning algorithm in the training phase and observed that one block of code takes too much ...
Student's user avatar
  • 103
4 votes
2 answers
304 views

Multiplayer queue optimisation

I currently have code that is working but I think it can be optimised. The code waits until a player joins and adds the player to a BlockingQueue if there is not already a Player waiting then it ...
Lee's user avatar
  • 43

15 30 50 per page
1
2 3 4 5
12