• Post Reply Bookmark Topic Watch Topic
  • New Topic

I want to make this algorithim quicker  RSS feed

 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, I wish to make this string formating too much quicker. This algorithm is really slowing me down. Can anyone suggest a way to improved the execution time?



Im working with several thousand words
[ December 26, 2007: Message edited by: Nikos Katsikanis ]
 
Walter Bernstein
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did'nt check your code in detail, but try to replace the datatype of countryText and universityText from String to StringBuffer.
 
Nikos Stavros
Ranch Hand
Posts: 243
Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks mate. Its now working about em.... lets say 200 times faster! Merry Christmas
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you need the dubious synchronisation that StringBuffer provides, you should use StringBuilder. It should be slightly faster again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!