skip to main | skip to sidebar

metallica rocks

Tuesday, October 19, 2004

a simple Jython timing function

for any func i'd like to time in Java, I can use it with a call

print 'foo takes=',mytime(foo,[bar1,bar2,..barN])



# a higher order func
def mytime(f,args):
start=System.currentTimeMillis()
f(*args)
end=System.currentTimeMillis()

return end-start


Posted by Dodge This at 11:48 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2010 (1)
    • ►  August (1)
  • ►  2009 (1)
    • ►  May (1)
  • ►  2006 (2)
    • ►  July (2)
  • ▼  2004 (52)
    • ►  December (2)
    • ►  November (10)
    • ▼  October (8)
      • good resource for beginner Python
      • a simple Jython timing function
      • write tools in Jython
      • Thanksgiving long weekend flu
      • the design of CLP
      • automated QA tools using Jython
      • A benchmark comparison of a number of programming ...
      • things to learn in the coming month till Xmas
    • ►  September (7)
    • ►  August (11)
    • ►  July (3)
    • ►  June (11)

Links

  • RapIsKoOL
  • jwz
  • Paul Graham
  • Jim H
  • Trevor Blackwell
  • Peter Norvig
  • Sean McGrath
  • braithwaite lee
  • Michael Yuan
  • bbs.askynz
  • cedia

About Me

My photo
Dodge This
curious, fun seeking
View my complete profile