Hi Sridar,
Have you tried running it through DM package? Is the performance same?
Try to scope the script as much as possible. This will reduce the number of records to be fetched from the database and eventually will enhance the performance. Keep the model also optimized.
Hope this helps.