Welcome to Dream.In.Code
Become an Expert!

Join 150,071 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,807 people online right now. Registration is fast and FREE... Join Now!




Function Called With Same Arguments Many Time

 
Reply to this topicStart new topic

Function Called With Same Arguments Many Time, How to avoid function calling with same arguments again & again

unbuonragazzo
12 Jun, 2008 - 09:23 AM
Post #1

New D.I.C Head
*

Joined: 12 Jun, 2008
Posts: 5

I have an algorithm that has to call a function
f(x1,x2,x3,....,xn) with 25,000-50,000 sets (x1,...xn). It happens many times that the same set of values may repeat itself many times and it is unnecessary to calculate the function again because that will consume a lot of cpu (computation time). How can i avoid computing the function for the same set of arguments. Somebody told me that the hashing will solve the problem. I don't know that as I am new to hashing. Kindly help me ........... and if possible post the answer on my email (dr.sharma.du@gmail.com)


I will be highly thankful ...............
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:57PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month