Hi Andy,

http://dev.clojure.org/jira/browse/CLJ-1080 has not the same type hints as 
I propose. You can see my patch here:

    https://github.com/alexanderkiel/clojure/compare/instant-type-hints

I have an additional type hint at thread-local-utc-date-format and I use 
java.text.DateFormat instead of java.text.SimpleDateFormat at utc-format.

Alex

Am Mittwoch, 9. Oktober 2013 18:49:32 UTC+2 schrieb Andy Fingerhut:
>
> Could you take a look at the patch on ticket CLJ-1080 and see if it 
> contains all of the improvements you mention?  Let me know if it doesn't, 
> and we can look at combining your improvements into that patch.
>
>     http://dev.clojure.org/jira/browse/CLJ-1080
>
> Andy
>
>
> On Wed, Oct 9, 2013 at 8:57 AM, Alexander Kiel <alexan...@gmx.net<javascript:>
> > wrote:
>
>> Hi,
>>
>> I have a web service returning edn representations containing many 
>> java.util.Date values. Using a profiler, one Hot Spot is inside the 
>> clojure.instant/print-date function. The relevant reflections warnings are:
>>
>>     Reflection warning, 
>> instant.clj<https://github.com/clojure/clojure/blob/master/src/clj/clojure/instant.clj>:172:20
>>  
>> - reference to field get can't be resolved.
>>     Reflection warning, instant.clj:174:15 - call to format can't be 
>> resolved.
>>     Reflection warning, instant.clj:174:5 - call to write can't be 
>> resolved.
>>
>> Adding a ^ThreadLocal annotation to thread-local-utc-date-format and 
>> a ^java.text.DateFormat to utc-format resolves all reflection warnings.
>>
>> I tested the speedup with 
>>
>>     (time (let [d (java.util.Date.)] (doseq [_ (range 100000)] (pr-str 
>> d))))
>>
>> which takes about 1500 ms without the type annotations and about 500 ms 
>> with type annotations.
>>
>> A single web service access is speeded up from about 350 ms to 250 ms. 
>> The response contains about 3000 java.util.Date values.
>>
>> I could create a pull request if that would help. But I like to discuss 
>> the change first. I have no CA so I use Clojure instead of Clojure Dev.
>>
>> Alex
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com<javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to