• Post Reply Bookmark Topic Watch Topic
  • New Topic

*.properties file v/s Hashmap ??  RSS feed

 
aravind kanganar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

if,


then which one will be faster?
resourceBundle.getString("key") ;
OR
hashMap.get("key"); ?

Or let me put it this way,

does resourceBundle.getString() do frequent file access for fetching value for every "getString("key")" ?
(which can impact performance of my application)

Please provide your valuable answers/suggestions

Thanks in advance,
Aravind
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both should be plenty fast enough. It is easy enough to test though, so you could do that if the performance is of concern which i doubt it will be.
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I find interesting about this sort of question is that, even if it really mattered, in the time taken to ask the question the OP could have set up a simple test harness to find out which is the fastest.


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!