[racket] How can I speed up this code?

From: Danny Yoo (dyoo at hashcollision.org)
Date: Mon Jan 14 13:50:19 EST 2013

>
> # 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


Posted on the users mailing list.