0

I want a faster laptop for coding (mostly C++ and Python programs) but don't know what factors influence program runtime. Is it mostly CPU speed and RAM? Hyperthreading? Solid state drives?

For example, I like to play on sites like Project Euler, where sometimes I'll need to make a semi-brute force program when I can't figure out a faster algorithm. If I ever have to resort to this, I want the program to be as fast as possible.

4
  • Welcome to Super User! In Super User, and all the StackExchange sites, shopping or product recommendations are considered off topic and open ended, and sometimes even too localized. Try to reword your question in a way that you are not asking for products, but more of processes; this will help keep it on topic – Canadian Luke Mar 6 '13 at 21:15
  • @Luke I just suggested an edit to remove the "what do you recommend" bit. The core of the question (what factors influence speed) is a valid question. – cpast Mar 6 '13 at 21:20
  • I approved the edit – DoubleBass Mar 6 '13 at 21:22
  • @cpast I can't un-vote to close, but now that it's not a hardware recommendation question, as long as 3 other 3K+ users don't VTC, it will go away – Canadian Luke Mar 6 '13 at 21:41
0

It depends a lot on the type of application and what it does, but for Project Euler problems, the speed of execution is largely going to depend on:

  1. How fast your processor runs,
  2. Whether the code (especially the loops) can reside entirely in processor cache, and
  3. Whether the algorithm can be parallelized (i.e. can you solve the problem using multiple processor cores?)

Other types programs may depend on other factors such as hard drive speed and memory speed. Gaming machines lean towards having a better video card than your average, run-of-the-mill one, since games depend heavily on image manipulation.

13
  • Is parallelization something that happens automatically, or is it something you code into the algorithm? – DoubleBass Mar 6 '13 at 21:27
  • It doesn't happen automatically. Most modern programming environments offer something like Tasks or Threads to parallelize computations. Some algorithms lend themselves more readily to parallelization than others. All other things being equal, functional programming languages are more easily parallelizable than imperative ones. – Robert Harvey Mar 6 '13 at 21:29
  • I know it's technically stated in the OP not to ask for hardware recs, but it would really help get me started -- would you recommend looking for something with solid states, fast CPU (what kind?), lots of memory, etc? – DoubleBass Mar 6 '13 at 21:30
  • Unless you're doing advanced scientific number crunching, any off-the-shelf computer with multiple processor cores (which is most of them, nowadays) should suffice. – Robert Harvey Mar 6 '13 at 21:33
  • Many problems do involve heavy number crunching, yes – DoubleBass Mar 6 '13 at 21:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.