Index syndication
comment syndication

MacBook vs. MacBookPro

Does CPU speed matter for gaming on a Mac Laptop?

The difference between, for example, 2.4 Ghz and 2.6 Ghz will be negligible when running the games. What will contribute to the smoothness and quality of the games the Graphics Processing Unit (GPU) and to an extent bus speed, CPU cache and RAM.

When it comes to RAM, the more the merrier – to avoid the Hard Drive being used to swap applications when your memory is full. Get as much RAM as you can afford.

Consider the current models of a MacBook vs. a MacBookPro – they both have similar specifications on the CPUS.

  • The 13″ MacBook has 2.4GHz Intel Core 2 Duo processor with 3MB on-chip shared L2 cache
  • The 13″ MacBookPro has a 2.4GHz or 2.66GHz Intel Core 2 Duo processor with 3MB on-chip shared L2 cache
  • The 15″ MacBookPros have 2.4GHz, 2.53GHz or 2.66GHz Intel Core i5/i7 processors with 3MB and 4MB shared L3 cache respectively.

The i5 and i7 CPUs are the next in an architectural line of mobile CPUs from Intel, so it’s not the “Ghz” that’s going to improve your gaming – it’s having the later generation CPUs. In the CPU arena, the 13″ Pro/Non-Pro models are the same – but the 15″ Pro models are clearly in front.

Now consider the Graphics Processor, the real workhorse in modern 3D gaming. The current models as shown:

  • The 13″ MacBook has NVIDIA GeForce 320M graphics processor with 256MB of DDR3 SDRAM ***shared with main memory***
  • The 13″ MacBookPro has NVIDIA GeForce 320M with 256MB DDR3 SDRAM ***shared with main memory***
  • The 15″ MacBookPro has TWO GPU devices: Intel HD Graphics with 256MB DDR3 SDRAM shared with main memory, and NVIDIA GeForce GT 330M graphics processor with 256MB GDDR3 memory and automatic graphics switching

In all cases, there is a GPU sharing Main Memory. These are much faster than the Graphics of yesteryear, but sharing the main memory means using some of your 2GB or 4GB of RAM. Games will play and look acceptable, but the framerate wont be the best you can get.

Where the laptop will shine, is with the dedicated NVIDIA GeForce GT chips. They have dedicated DDR3 memory allocated to them, designed to do one thing only – fast 3D.

My recommendation:
If you are on a budget – a MacBook or a 13″ MacBookPro will have to do.
However if you can afford it, and want to game – a 15″ MacBookPro with a dedicated GPU will play your games as smooth as any current generation laptop can. You can’t go wrong with the larger screen either.

Perl while loop memory hog

I was trying to use someone elses script for logging dansguardian events to an RDBMS.The script was chewing up 99% of my CPU! I got chatting to a friend and a perl coder about this, and got some ideas. He showed me about the perl debugger using the -d switch. Awesome. I finally got my perl script working. Installing the DBI package on OpenBSD was a snap with pkg_add (pkg_add -v p5-DBD-Pg-1.47.tgz). My logical debugging was as follows.

first I read that DBI was a memory hog so I wrote it out and put in a native postgres call, but the pgsql for perl was borked.
(comment from coding friend “DBI is fine man, works for the massess”). Next I changed the while loop over the the file to a Tail::File method, but the module was badly documenting and had issues.

I actually ended up using IO::File to tail the log and looped over the lines (in a mad loop), but it was still broken.
So I went back to DBI, which as my friend pointed out was never a problem. It worked!

It turned out the loop was the CPU hog and all I had to do was put in a sleep 1; if there was no new line in the tail.
In the process I rewrote the whole script and it barely resembles the original except for the idea. Now it has 0.5% CPU load at best. A win for coding. I’ll post the script soon and also send it to dansguardian.

Comment from perl coding friend: of course – i guessed that after u left. 🙂