You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entries/ghatem-fpc/README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -257,7 +257,21 @@ As of the latest results executed by Paweld, there are two main bottlenecks thro
257
257
Currently, the hash lookup is done on an array of records. Increasing the array size causes slowness, and reducing it causes further collisions.
258
258
Will try to see how to reduce collisions (increase array size), all while minimizing the cost of cache misses.
259
259
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
+
260
274
For the ExtractLineData, three ideas to try implementing:
261
275
- 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
263
277
- unroll the loop (although I had tried this in the past, did not show any improvements)
0 commit comments