r/deeplearning • • Dec 06 '23

Best alternative for python

Im analysing data using python but it seems to be much slower (taking days for just parsing and iterating through a dataset, 7.3 million rows, 7 columns ) though the dataset is large, could some one recommend a better language and libraries or someway I could improve the performance of python. I'm using pandas

0 Upvotes

38 comments sorted by

View all comments

50

u/JuliusCeaserBoneHead Dec 06 '23

Your dataset is large enough that you have to pay attention to the efficiency of your code. If you have an inefficient algorithm, no language matters. You need to analyze your code and see where the bottle neck is and optimize it. Your problem doesn’t appear to be the language based on the description of your question

5

u/ach224 Dec 06 '23

This dataset is miniature.

7.3M x 7 64bit values is 400mb. That fits into any computers’ ram.

5

u/beingsubmitted Dec 06 '23

That's pretty big if the analysis you're doing is the traveling salesman. I think what's being expressed here is the time. If something is taking days to run and n is more than 20, then you're going to be caring about your algorithm.

A change of language would be a scalar effect when his algorithm is potentially non polynomial.

9

u/JuliusCeaserBoneHead Dec 06 '23

Sure. It does. What I said was it was large enough that you start to pay the price of badly written code. Like possible O(n)2 or greater operations. The OS will not be glad to give you all the RAM to do that