Posted to tcl by oldlaptop at Sat Jun 26 17:20:10 GMT 2021view raw

  1. % time {dict get [lindex [dict get [json parse [string trim $json]] baz] end] inner} 1000000
  2. 2.091678 microseconds per iteration
  3.  
  4. % time {json get $json baz end inner} 1000000
  5. 0.768825 microseconds per iteration
  6.  
  7. % sqlite3 parser :memory:
  8. % time {parser onecolumn {select json_extract($json, '$.baz[#-1].inner')}} 1000000
  9. 2.301713 microseconds per iteration