What is Pointer-chasing and how is it related to BFS

When reading PPT in BFS (the first search on the heels), I found that BFS can be used where we have a “chasing pointer”. What is a chasing pointer and how is it related to BFS?

+4
source share
3 answers

Pointers mean a graph of your data. BFS (width search) is a search algorithm on this graph.

A pointer changer is another word for the following sets of pointers.

+6
source

It’s easiest for me to come up with an example Linked List.

, Linked List 5 . , Pointer-chasing .

+3

From a hardware (CPU) point of view, pointer scans are bad for performance because data reading is actually serialized on the CPU (i.e. without ILP). You cannot start reading (i.e. Load instr) until the previous one is completed (since the previous load gives us the address for the next load, etc.).

+2
source

All Articles