in reply to Adding a lot of small integers

you're using pop in your Perl version. In your C solution you're just using indexes and the array, why don't you do exactly the same in Perl and then report back with some time measurements.