Wednesday, February 28, 2007

Branch Prediction (cont.)

This code computes the minimum or maximum of two values without doing any branching. Because modern CPUs try and fetch instructions before they execute, and despite branch prediction code, branchless code still runs a bit faster.

int x; // we want to find the minimum of x and y
int y;
int r; // the result goes here
r = y + ((x - y) & -(x < y)); // min(x, y)
r = x - ((x - y) & -(x <>

Branch Prediction

In a CPU, part of the processor tries and fetches instructions from memory before they are needed as otherwise the CPU has to wait for the instruction. This is called pre-fetching and the instructions are held in an instruction pipeline.

If a branch occurs then the pipeline has to be refilled and branch prediction attempts to work out if the branch will be taken and start fetching instructions.

Tuesday, February 20, 2007

Java Prac List:

Java Prac List:

Thursday, February 15, 2007

DRM, take a HIDE !

Those cooky kids over at the Doom9 forums hate themselves some DRM. Not more than two months after discovering a means to extract the HD DVD and Blu-ray Disc "volume keys" to decrypt AACS DRM on individual films, we're now getting word that DRM hacker arnezami has found the "processing key" used to decrypt the DRM on all HD DVD and Blu-ray Disc films. Let's break this down for what it is: instead of needing individual keys for each and every high-definition film -- of which there are many -- the processing key can be used to unlock, decrypt, and backup every HD DVD and Blu-ray Disc film released so far. As arnezami points out, "nothing was actually hacked, cracked or even reverse engineered." All he had to do was keep an eye on his memory, watch what changed, and voila... the processing key appeared. So kick back and watch the trickle of HD titles hitting the torrents quickly turn into a flood (at ~20GB a pop, that's not an exaggeration) when the BackupHDDVD and BackupBluray utilities (or AnyDVD HD) are updated to reflect the new hack find.

Wednesday, February 14, 2007

Gmail for ALL !

Nearly three years after its debut, Gmail has finally shed its invitation-only status. In the U.S., Canada, Mexico and other countries, anyone can sign up for an account. That account will include the usual 2.8GB of storage and all the other Gmail goodies, including the Archive and Mail Fetcher. Google plans to sell additional storage space for users who want it, though pricing has not yet been decided. For the time being, Gmail will retain its beta status.

Tuesday, February 13, 2007

Action games said to sharpen your vision by 20%

Even there's a study to prove (and disprove) just about everything, but sometimes a little panacea to help ease our anxieties and foster our addictions. (Cellphones not causing cancer is one that jumps to mind.) Today's comes from the University of Rochester, which, contrary to what your mom always told you would happen to your eyesight, showed that all those hours of Gears of War might just pay off: apparently tested subjects who play action games for a few hours daily experience a "substantial increase in the spatial resolution of their vision", making them about 20% better at identifying letters amidst visual clutter (a test similar to the one the DMV administers to see if you're fit to operate a vehicle). Unfortunately, reducing the eye-strain with less brain-draining titles (like puzzle games, for instance) wasn't found to work -- only action gamers, who need to look closely to find their prey, were shown to increase their acuity. That is, from a couple feet's distance, anyway. We'd really like to see the followup study that shows how near-sightedness is affected by staring for hours at a virtual space represented on a two-dimensional plane. Until then, tell your spouse you're working to improve your vision the next time you're demanded to give up the TV or your computer for more mundane activities.

Sunday, February 11, 2007

Yahoo Messenger for Vista

Yahoo Messenger for Vista, which is planned to be available in the second quarter of this year, allows users to combine multiple conversations into one window with multiple tabs instead of having windows cluttering the desktop.

Wednesday, February 7, 2007

Microsoft's Vista AV Fails Certification

Microsoft's much-hyped anti-virus solution, Live OneCare and three other Vista AV products failed to achieve the Virus Bulletin's VB100 certification. The other products are McAfee's VirusScan Enterprise, G DATA's AntiVirusKit 2007, and Norman's VirusControl. All failed to pass a series of tests that are required to display the VB100 badge. 'With the number of delays that we've seen in Vista's release, there's no excuse for security vendors not to have got their products right by now,' said John Hawes, technical consultant at Virus Bulletin.