I got a better result even than `--gc:none` by adding following code and 
compiling with `nim r -d:danger --opt:speed --gc:arc`.
    
    
    proc parseHook*(s: string, i: var int, v: var string) {.inline.} =
      v = newStringOfCap(64)
      jsony.parseHook(s, i, v)
    
    timeIt "jsony":
      for i in 1..5:
        discard json_str.fromJson(OptionChain)
    
    
    Run

Another optimization can be done by using 
[view](https://nim-lang.org/docs/manual_experimental.html#view-types) to 
rewrite parseSymbol.

Reply via email to