very fast thumbnail generator

I own a search-engine alike site that has to generate thumbnails as fast as possible. I tried using a php thumbnail generator as I am a php and web developer myself, but php is way too slow when processing an image, hence processing like 50 images and generating thumbnails for them takes like 9-10 seconds, which is terrible, no user on Earth is going to wait that much until a page loads.

I need a thumbnail generator, the language can be any that CAN interact with php and in a php file, that would generate like 50 thumbnails or MORE in 1 second or LESS.

Requirements:

- very fast processing: 50+ thumbnails in 1 second or less;

- the rest can follow any common php thumbnail generator, per example the function, let's call it thumbnail(path_to_open,path_to_save,maxH,maxW); I don't mind unsaved thumbnails, hence dynamic.

Specify the language you are going to use, and please only people who are able to speak correct English.