I know that Numba is not meant to it, but I wanted to try it.
For a Graph with 4 vertices:
Python Execution time: DFS Finished in 4.5497 MilliSeconds.
For Numba it will be : DFS Finished in 1768.8087 MilliSeconds.
I tried with 10 vertices, but Numba raise a exception.
In attempt to see what is the cause of it, I profile it with cProfile.
It showed that using only python 28 functions was called.
while with Numba 1155632 functions was called, a lot of them is Numba related.
Part of the code is here: NumbaDFS - Pastebin.com
The Project (including the profile data): GitHub - LiorA1/PythonNumba: An attempt to implement DFS using Numba
Can I correct it in some way ?
Edit: I know that Numba purpose is not for it, I didnt delete because it might give some insights…