Apart from i/o, allocating memory is usually the slowest thing you can do on a computer, in my experience.