<div dir="ltr"><div style>Was checking to see if Python &quot;optimized&quot; with a native &#39;C&#39; parser.  This seems to imply it does at least in 2.6. I have 2.7.3 in my system.  </div><div><br></div><div><a href="http://svn.python.org/view/python/trunk/Modules/_json.c?view=markup">http://svn.python.org/view/python/trunk/Modules/_json.c?view=markup</a><br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 11:12 AM, J G Cho <span dir="ltr">&lt;<a href="mailto:gcho@fundingmatters.com" target="_blank">gcho@fundingmatters.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear performance experts,<br>
<br>
With the news of math library in Racket and the goal of improving my<br>
data analysis skill, I have started going over the examples in book<br>
&quot;Python for Data Anyalysis&quot; by McKinney using both Python and Racket.<br>
Too early to tell which is preferable for me. But I do have one<br>
&quot;problem&quot; with Racket that I would like to resolve before going on<br>
further.<br>
<br>
Here is the detail.<br>
<br>
Python:<br>
<br>
First I load the data<br>
<br>
# It looks like this at the top level;<br>
# structured differently from the example in the book.<br>
data_set = {<br>
&quot;meta&quot;: {},<br>
&quot;data&quot;: []<br>
}<br>
<br>
import json<br>
<br>
# read in the json data downloaded from<br>
# <a href="https://explore.data.gov/Information-and-Communications/1-USA-gov-Short-Links/wzeq-n5pg" target="_blank">https://explore.data.gov/Information-and-Communications/1-USA-gov-Short-Links/wzeq-n5pg</a><br>
with open(&quot;usagov_bitly_data.json&quot;) as f:<br>
    data_set = json.load( f )<br>
<br>
<br>
And then I go do the usual slice and dice....<br>
<br>
My work flow is to edit the file and either run it inside Sublime Text<br>
2 or ipython --pylab. (v 2.7 via EPD package running on Win 7 on<br>
fairly new and powerful Dell.) There is a brief pause before I see the<br>
output in the screen.<br>
<br>
<br>
<br>
I run the following in DrRacket (v5.3):<br>
<br>
#lang racket<br>
<br>
(require json)<br>
<br>
(define data-set<br>
  (call-with-input-file &quot;usagov_bitly_data.json&quot;<br>
    (lambda (in)<br>
      (read-json in))))<br>
<br>
<br>
It takes sometime (more than a few sips of tea) where edit-run cycle<br>
is not workable.<br>
<br>
I initially thought maybe the json library was the cause and tried<br>
writing the parsed data out as .sexp and then reading that in. It did<br>
not resolve the speed issue for me. I now work with a smaller subset<br>
of data when I work with Racket.<br>
<br>
Any suggestions?<br>
<br>
jGc<br>
____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br></div>