[racket] How can I speed up this code?
>
> # read in the json data downloaded from
> # https://explore.data.gov/Information-and-Communications/1-USA-gov-Short-Links/wzeq-n5pg
> with open("usagov_bitly_data.json") as f:
> data_set = json.load( f )
Nice dataset! So it's about 98 megabytes, if I've downloaded the right file.
Let's use the profile library:
http://docs.racket-lang.org/profile/index.html
to try measuring where the json parser's time is going toward.
I copied a version of the json parser, and added the following two
lines to the bottom:
(require profile)
(profile (read-json (open-input-file "rows.json")))
When I run the module, the profile that comes out when I run this
snippet shows the following output:
https://gist.github.com/4532270