Function Called With Same Arguments Many Time

How to avoid function calling with same arguments again & again

Page 1 of 1

0 Replies - 885 Views - Last Post: 12 June 2008 - 10:23 AM Rate Topic: -----

#1 unbuonragazzo   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 12-June 08

Function Called With Same Arguments Many Time

Posted 12 June 2008 - 10:23 AM

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 ([email protected])


I will be highly thankful ...............

Is This A Good Question/Topic? 0
  • +

Page 1 of 1