Le dimanche 29 novembre 2015 à 08:28 -0800, Cedric St-Jean a écrit :
> What I would try:
> 
> 1. ProfileView to pinpoint the bottleneck further
> 2. FastAnonymous to fix the lambda
> 3. http://julia-demo.readthedocs.org/en/latest/manual/performance-tip
> s.html In particular, you may check `code_typed`. I don't have
> experience with `split` and `eachline`. It's possible that they are
> not type stable (the compiler can't predict their output's type). I
> would try `for w::ASCIIString in ...`
> 4. Dict{ASCIIString, Int}()
> 5. Your loop will hash each string twice. I don't know how to fix
> that, anyone?
You can use the unexported Base.ht_keyindex() function like this:
https://github.com/nalimilan/FreqTables.jl/blob/7884c000e6797d7ec621e07
b8da58e7939e39867/src/freqtable.jl#L36

But this is at your own risk, as it may change without warning in a
future Julia release.

We really need a public API for it.


Regards

> 
> Good luck,
> 
> Cédric
> 
> On Saturday, November 28, 2015 at 8:08:49 PM UTC-5, Lampkld wrote:
> > Maybe it's the lambda? These are slow in julia right now. 

Reply via email to