is Vector of Vectors Vec<Vec<>> inefficient? performance issues rust Vectors

35 points iltallo

Hi, im doing a implementation of random forest classifier in rust, but i have had some troubles in performance. To give an example, my implementation in rust with release mode takes 5 sec, but using python sklearn with the same dataset it takes 0.5 seconds. I'm storing the data using Vec<Vec<>>, but i saw that this is kind of inefficient. Should i use arrays?? or use array\[vec\]?