Fairly large performance degradation between 0.3.7 and 0.4.0 (6x)

361 views
Skip to first unread message

Scott Jones

unread,
May 23, 2015, 8:31:20 PM5/23/15
to juli...@googlegroups.com
I'm not sure if this is something that has already been seen, but when I was trying to determine why
"generic" versions of a function that I had written were so much slower than separate versions, I
noticed that the slowdown was much greater under 0.4 than 0.3.7.

I have created a gist (https://gist.github.com/ScottPJones/f3fb082ac30d337d91bc) with the test program...
include it, and then do:
CheckUTF.dotest(1)
@time CheckUTF.dotest(100)
(the first time running the test simply to make sure everything is compiled)

Here are results from 0.3.7: 
ASCII:: Looping 100 times, length=4194304
UTF
-8: 4194304, UTF-16: 8388608, UTF-32: 16777216
Check UTF-8    elapsed time: 0.809306356 seconds (4800 bytes allocated)
Check UTF-16   elapsed time: 0.243143885 seconds (4800 bytes allocated)
Check UTF-32   elapsed time: 0.685690145 seconds (4904 bytes allocated)
Generic UTF-16 elapsed time: 1.25220144 seconds (4800 bytes allocated)
Generic UTF-32 elapsed time: 1.406372768 seconds (4800 bytes allocated)

Surrogates:: Looping 100 times, length=4718592
UTF
-8: 7864320, UTF-16: 9437184, UTF-32: 18874368
Check UTF-8    elapsed time: 1.230037991 seconds (4800 bytes allocated)
Check UTF-16   elapsed time: 0.579617553 seconds (4800 bytes allocated)
Check UTF-32   elapsed time: 0.673533505 seconds (4904 bytes allocated)
Generic UTF-16 elapsed time: 1.90101083 seconds (4800 bytes allocated)
Generic UTF-32 elapsed time: 2.005780957 seconds (4800 bytes allocated)

Here are results from 0.4:
Julia Version 0.4.0-dev+4960
Commit 96b511c* (2015-05-23 19:50 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

ASCII:: Looping 100 times, length=4194304
UTF
-8: 4194304, UTF-16: 8388608, UTF-32: 16777216
Check UTF-8     679.528 milliseconds (100 allocations: 4800 bytes)
Check UTF-16    233.352 milliseconds (100 allocations: 4800 bytes)
Check UTF-32    659.472 milliseconds (102 allocations: 4880 bytes)
Generic UTF-16    7.560 seconds      (100 allocations: 4800 bytes)
Generic UTF-32    7.574 seconds      (100 allocations: 4800 bytes)

Surrogates:: Looping 100 times, length=4718592
UTF
-8: 7864320, UTF-16: 9437184, UTF-32: 18874368
Check UTF-8       1.128 seconds      (100 allocations: 4800 bytes)
Check UTF-16    640.544 milliseconds (100 allocations: 4800 bytes)
Check UTF-32    726.304 milliseconds (102 allocations: 4880 bytes)
Generic UTF-16   11.633 seconds      (100 allocations: 4800 bytes)
Generic UTF-32   12.294 seconds      (100 allocations: 4800 bytes)


Tony Kelman

unread,
May 23, 2015, 9:46:12 PM5/23/15
to juli...@googlegroups.com
Can you try profiling http://docs.julialang.org/en/latest/manual/profile/ to get a more specific sense of where the slowdown is happening?

Scott Jones

unread,
May 24, 2015, 12:42:45 AM5/24/15
to juli...@googlegroups.com
I'll try to do that, but I'm leaving for two weeks early Tuesday morning, it may be a while until I get a chance), and I thought it was important that people know this was happening...
The code is all in the gist I provided...

Viral Shah

unread,
May 24, 2015, 11:00:35 PM5/24/15
to juli...@googlegroups.com, scott.pa...@gmail.com
Would be great if you can file an issue before leaving.

-viral

Milan Bouchet-Valat

unread,
May 25, 2015, 3:29:00 AM5/25/15
to juli...@googlegroups.com, scott.pa...@gmail.com
Le dimanche 24 mai 2015 à 20:00 -0700, Viral Shah a écrit :
> Would be great if you can file an issue before leaving.
There's a minimal reproducer here:
https://github.com/JuliaLang/julia/issues/11425

Regards

Scott Jones

unread,
May 25, 2015, 7:47:34 AM5/25/15
to juli...@googlegroups.com, scott.pa...@gmail.com
Somebody (dgeogh Thanks!) beat me to it while I crashed after staying up too late trying to figure out what in the world was going on...
Reply all
Reply to author
Forward
0 new messages