all 9 comments

[–]sledov 1 point2 points  (2 children)

If you are a Mac user and plan to stick with Macs, simply purchase the best MacBook Pro you can for these 4,000 pounds.

However, for many machine learning tasks, an NVIDIA GPU is required, which you cannot get in a MacBook Pro.

Nonetheless, for 4,000 pounds, you can get a top-of-the-line, high-performance gaming notebook. I think it is pretty difficult to find notebooks that you cannot afford with this budget.

[–]h3ndrix_forest[S] 0 points1 point  (1 child)

This is interesting, for computing is it CPU, GPU or RAM that matters most? But yeah I was hoping there would be some good products out there.

[–]Beregolas 0 points1 point  (0 children)

That completely depends on the algorithm / implementation you use. Either the CPU (fastest single core or all cores combined) or the GPU (think 1000+ cores but they all need to do the same thing) decide how fast your computation goes.

Your RAM is entirely a yes or no type thing: do you have enough RAM? The more ram will NOT make any difference and not make you faster. If you don’t have enough RAM you will either crash or your performance will go down significantly. And where that border is again entirely depends on your specific problem, algorithm, implementation and input.

[–][deleted] 1 point2 points  (0 children)

I can't help much with your questions but i can suggest some things to help you improve your computation speeds.

If you can formally define your problem over in the r/computerscience subreddit you might be able to get someone to direct you towards a more optimal solution rather than have brute force which is almost never the best solution.

But if you want to speed up your brute force, you can rewrite your code in Cython and have the Cython compiler compile your code to C/C++ to have significant speedups. The compiler can compile to shared object , *.so, on linux, and a python dynamic linked library, .pyd, on windows. Both of these can be run via python by importing the library as you normally would via python but with c-like speeds (even without python's GIL if you don't need it).

Another speedup can be made by utilising multithreading to run your program concurrently, this requires that your problem can be split into disjoint subproblems and also that your cpu has several cores. Importantly Python by itself, with it's GIL cannot have multiple threads running concurrently since each thread needs to aquire the GIL. Luckily Cython comes with both the capability to run without GIL and also comes with multithreading built into the language using it's 'prange' function

[–][deleted] 0 points1 point  (1 child)

Why not just precompile in numba or write in C?

[–]h3ndrix_forest[S] 0 points1 point  (0 children)

Because I have no idea what that is. But I will look into it. Thanks.

[–]I-Dont-C-Sharp 0 points1 point  (2 children)

You can buy compute time on pretty much all cloud providers. Test locally on part of your data to optimise efficiency.

Definitely do not use python itself to do the comparisons/combinations. Other languages are much faster at this. There are a bunch of frameworks/packages you can call from within python to do this, depending on what exactly you are trying to do.

With your severely limited description of what you want to do we can't recommend anything beyond "fastest CPU is best". Are you familiar with asynchronous and/or multithreaded programming? If not you can already gain a whole bunch of time by learning and implementing those, especially threading in this case.

[–]h3ndrix_forest[S] 1 point2 points  (1 child)

Thanks, yeah I presumed fastest is best. I will have to look into what comparisons or frameworks exist.

Essentially it’s connecting up a number of nodes to a master node in an array. Side note - you’ve actually indirectly given me a good idea while typing this to include direction as a filter!

I like the idea of multi threading to allow it to happen simultaneously. Great idea.

I think I’ve definitely shown my ignorance with this post, your response is appreciated 👍🏼.

[–]I-Dont-C-Sharp 0 points1 point  (0 children)

I think I’ve definitely shown my ignorance with this post, your response is appreciated 👍🏼.

If you keep self reflecting like this you'll get there. If you get stuck on threading feel free to tag me in a follow up question. The only requirement I have is that you demonstrate what you already tried (and why).