java - Dictionary: hard-coded vs. external file -


i have java application started , stopped multiple times per second on hundreds of millions of items (called external script).

input: string key output: int value 

the purpose of application key in never ever ever changing map (~30k keys) , return value. easy.

question: more efficient when used multiple times per second:

  1. hard-coded dictionary in map
  2. read external file bufferedreader
  3. ...amaze me other ideas

i know hard-coding evil sometimes, need evil efficient :-)

read in dictionary file. store in map. set java application service runs continuously (since said gets called many times per second). map cached in ram.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -