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:
- hard-coded dictionary in
map
- read external file
bufferedreader
- ...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
Post a Comment