before next stage
This commit is contained in:
14
doc/explain.md
Normal file
14
doc/explain.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Chart with suffix -1.png
|
||||
|
||||
In those three chart, we know that they all have similar instruction, the distribution wasn't similar to linklist, but the average time is.
|
||||
|
||||
It's because two reason, one cause high baseline time, another is the data structure I use.
|
||||
|
||||
The first reason which cause high baseline time is bad IO optimization, It read from file for every prefix, even worse, I open file to write the chart before calling `usize end=rdtsc_64bits();`, which block.
|
||||
|
||||
The second reason is the addition of HashMap, rather than placing linklist(xor linklist) in vector(slice), I placed linklist in a custom hashmap, moreover, when the key is missing in the hashmap, the `hash_get()` function iterating all elements in hashmap, and hash collusion was discovered in one of the bucket, so there are several operation took significantly more time.
|
||||
|
||||
# Chart with suffix -2.png
|
||||
|
||||
After optimize some IO, I get correct result for combination of hashmap and linklist.
|
||||
|
BIN
doc/prefix_delete-1.png
Normal file
BIN
doc/prefix_delete-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
doc/prefix_delete-2.png
Normal file
BIN
doc/prefix_delete-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
doc/prefix_insert-1.png
Normal file
BIN
doc/prefix_insert-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
doc/prefix_insert-2.png
Normal file
BIN
doc/prefix_insert-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
BIN
doc/search-1.png
Normal file
BIN
doc/search-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
doc/search-2.png
Normal file
BIN
doc/search-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Reference in New Issue
Block a user