     (Double/valueOf string)))
 
 (defn- read-number [^PushbackReader stream]
-  (let [buffer (StringBuilder.)
+  (let [buffer (StringBuilder. 4)
         decimal? (loop [decimal? false]
                    (let [c (.read stream)]
                      (codepoint-case c

    "Print object to PrintWriter out as JSON"))

(defn- write-string [^CharSequence s ^PrintWriter out]
  (let [sb (StringBuilder. (count s))]
    (.append sb \")
    (dotimes [i (count s)]
      (let [cp (int (.charAt s i))]
        (codepoint-case cp
          ;; Printable JSON escapes

              (recur)))))))

(defn- read-integer [^String string]
  (if (< (.length string) 18)  ; definitely fits in a Long
    (Long/valueOf string)
    (or (try (Long/valueOf string)
             (catch NumberFormatException e nil))
