That wondrous mathematical toy, the Rubik’s Cube, turns 40 this year and remains an unsolvable puzzle for countless people, but the Cube is no challenge for a Samsung Galaxy S4.

The Cubestormer 3, a robot made of Legos with a Samsung Galaxy S4 handset as its brain, was able to solve a classic 3x3x3 Rubik’s Cube in just 3.253 seconds at the Big Bang Fair in Birmingham, England, in March. The robot now holds the world record for the fastest robot to solve a Rubik's Cube. That's a record it took from its predecessor, the Cubestormer 2, a robot powered by a Samsung Galaxy S2 handset, which solved a Rubik’s Cube in 5.27 seconds in 2011.

The current human record is 5.55 seconds, which was achieved by 17-year-old Dutchman Mats Valk in 2013.

The Cubestormer 3 was built by co-inventors David Gilday and Mike Dobson with the sole purpose of being extremely fast. Its Samsung Galaxy S4 “brain” is powered by Samsung’s 5 Octa chipset. Known for its speed in processing, the chipset includes four Cortex-A15 and four Cortex-A7 CPUs. The Galaxy S4 is able to analyze the cube's starting arrangement and directs the robot’s four arms in the motions that will solve the puzzle. Some say the four arms on the Cubestormer 3 give it a bit of an advantage in solving a Rubik’s Cube faster than a human.

The Rubik’s Cube was invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik. The Rubik’s Cube is considered the world’s bestselling toy with 350 million cubes sold worldwide as of 2009.

Follow me on Twitter.