Comments (4)
If we are not going to give the queue implementation its own directory, should we put it in a utils
directory, or should we just place it in the socket_tcp_manager folder for simplicity's sake?
Is the implementation just going to store a typeless pointer to the object, or should we also give it a certain size and have the queue structure actually contain the data?
from simple-http-server.
My thought is that queue, hashmap, task struct would all be in one utils
folder.
This may also make the project more structured when we add the unit test code and add a run tests option to the build.
So I have seen queue structures in C implemented as a linked list. This would help to keep track of size and for later deletion. In this scenario, each node would just have a pointer to void *
data.
from simple-http-server.
From an algorithms point of view, a singly linked list should be the best for the queue, as long as we just hold a pointer to the head and tail. Then insertion to the back and deletion from the front is O(1).
There is also a chance that a resizable array could utilize cache locality better, but that would require some benchmarking to see if that works out in our case.
from simple-http-server.
From an algorithms point of view, a singly linked list should be the best for the queue, as long as we just hold a pointer to the head and tail. Then insertion to the back and deletion from the front is O(1).
There is also a chance that a resizable array could utilize cache locality better, but that would require some benchmarking to see if that works out in our case.
Yes I think for our purposes the queue will be fine. We can always improve later
from simple-http-server.
Related Issues (13)
- Create Base Project Directory Structure
- Create HashMap Library HOT 3
- Create generic resizeable array implementation
- Improved logging in the testing framework HOT 1
- Add Functions to Linked List Implementation
- Create Basic HTTP POST Parsing for HTTP lib
- Replace Existing Unit Testing Unity/CMock utility
- Add Build Instructions For Cmake to README.md
- Create State Diagram of Socket TCP Manager Design HOT 2
- Create easy, automated way to run unit tests. HOT 2
- Create Task Structure Library HOT 3
- Create String Library HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-http-server.