Before anyone can suggest 'other way to reduce the time and boost the performance of the code' you should post the code in question. That way people can suggest changes which could be made. Take a look at How do I post a question effectively? regards posting pertinent information.
You have been a user here long enough to know that you should not use PRE tags when posting code. This is also pointed out to you when you 'preview' a post. Please re read the PerlMonks FAQ and Writeup Formatting Tips.
Update: Thanks for swapping pre for code tags, however if you look at How do I change/delete my post? (linked from the PerlMonks FAQ I mentioned above) you will find the conventions use here for updating nodes you have written.