Skip to content

Commit 47c9b93

Browse files
committed
improve readme to document some ideas
1 parent 57a626f commit 47c9b93

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

entries/ghatem-fpc/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,21 @@ As of the latest results executed by Paweld, there are two main bottlenecks thro
257257
Currently, the hash lookup is done on an array of records. Increasing the array size causes slowness, and reducing it causes further collisions.
258258
Will try to see how to reduce collisions (increase array size), all while minimizing the cost of cache misses.
259259

260+
Edit:
261+
The goal is to both:
262+
- minimize collisions on the hashes (keys) by having a good hash function, but also increase the size of the keys storage
263+
- minimize the size of the array of packed records
264+
265+
The idea:
266+
- the dictionary will no longer point to a PStationData pointer, but rather to an index between 0 and StationCount, where the record is stored in the array.
267+
- -> data about the same station will be stored at the same index for all threads' data-arrays
268+
- -> names will also be stored at that same index upon first encounter, and is common to all threads
269+
- no locking needs to occur when the key is already found, since there is no multiple-write occurring
270+
- the data-arrays are pre-allocated, and a atomic-counter will be incremented to know where the next element will be stored.
271+
272+
Thinking again, this is likely similar to the approach mentioned by @synopse in one of his comments.
273+
260274
For the ExtractLineData, three ideas to try implementing:
261275
- avoid using a function, to get rid of the cost of stack checking
262-
- reduce branching
276+
- reduce branching, I think it should be possible to go from 3 if-statements, to only 1
263277
- unroll the loop (although I had tried this in the past, did not show any improvements)

0 commit comments

Comments
 (0)