Re: [julia-users] Julia takes 2nd place in "Delacorte Numbers" competition

2015-01-21 Thread Arch Robison
My write-up and program are now available as attachments at https://software.intel.com/en-us/articles/computing-delacorte-numbers-with-julia . - Arch

[julia-users] Re: benchmark with Julia 2x faster than C

2015-01-29 Thread Arch Robison
I can't replicate the the 2x difference. The C is faster for me. But I have gcc 4.8.2, not gcc 4.9.1. Nonetheless, the experiment points out where Julia is missing a loop optimization that Clang and gcc get. Here is a summary of combinations that I tried on a i7-4770 @ 3.40 GHz. - Julia

[julia-users] Re: benchmark with Julia 2x faster than C

2015-01-29 Thread Arch Robison
CSE issue posted as https://github.com/JuliaLang/julia/issues/9960 .

[julia-users] Re: benchmark with Julia 2x faster than C

2015-02-12 Thread Arch Robison
> > Miles > > On Thursday, January 29, 2015 at 12:20:46 PM UTC-5, Arch Robison wrote: >> >> I can't replicate the the 2x difference. The C is faster for me. But I >> have gcc 4.8.2, not gcc 4.9.1. Nonetheless, the experiment points out >> where Julia is

[julia-users] Type inference cannot deduce that convert(Float32,x) returns a Float32?

2015-06-01 Thread Arch Robison
I was a bit surprised when I tried this example: function foo() global G #b = Float32(G) b = convert(Float32,G) b end G = 0.5 println(foo()) code_warntype(foo,()) and code_warntype deduced that the type of b is ANY instead of Float32. Is this a bug or a feature? If I use the con

[julia-users] Article on `@simd`

2014-09-15 Thread Arch Robison
I've posted an article on the @simd feature to https://software.intel.com/en-us/articles/vectorization-in-julia . @simd is an experimental feature in Julia 0.3 that gives the compiler more latitude

Re: [julia-users] Article on `@simd`

2014-09-15 Thread Arch Robison
Thanks to all for taking time to report my errors. I missed @code_llvm's introduction into Julia. It let me shorten that section slightly. Jacob is right about the row/column index. I tend to think of the leftmost subscript as the "runs down the column" index. When I'm working with Fortran/Juli

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Arch Robison
cle. When you describe how sets of vector instructions > occur, "simultaneously" would seem be more correct than > "instantaneously". Stylistically, the concerns paragraph seems a bit overly > concerned – perhaps one could be changed to a different word. > > On Sep 15,

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Arch Robison
The "llvm.mem.parallel_loop_access" is an annotation on loads and stores that indicate they do not depend on other iterations. @simd causes them to be sprinkled throughout the loop when the LLVM IR is generated. The lack of "load <*n* x float>" indicates that the LLVM vectorizer gave up. I'm not

Re: [julia-users] Article on `@simd`

2014-09-16 Thread Arch Robison
Yes, the indirect store (a "scatter" in vectorizer parlance) will stop the current vectorizer. AVX-512 has the requisite scatter instruction, so when AVX-512 becomes available and LLVM is updated to use it, we should revisit this example. In the other example, the reduction into cent_sumsq[k]

Re: [julia-users] Re: Article on `@simd`

2014-09-17 Thread Arch Robison
Thanks. Now fixed. On Wed, Sep 17, 2014 at 4:14 AM, Gunnar Farnebäck wrote: > In the section "The Loop Body Should Be Straight-Line Code", the first and > second code example look identical with ifelse constructions. I assume the > first one should use ? instead. Also the third code example has

Re: [julia-users] Re: Article on `@simd`

2014-09-17 Thread Arch Robison
/github.com/JuliaLang/julia/issues/8392> for the subject. On Wed, Sep 17, 2014 at 9:28 AM, Arch Robison wrote: > Thanks. Now fixed. > > On Wed, Sep 17, 2014 at 4:14 AM, Gunnar Farnebäck > wrote: > >> In the section "The Loop Body Should Be Straight-Line Code", the f

Re: [julia-users] Re: Article on `@simd`

2014-09-17 Thread Arch Robison
> command > in the Haswell CPU's. ) > > On Wednesday, September 17, 2014 4:48:26 PM UTC+2, Arch Robison wrote: >> >> There is support in LLVM 3.5 for remarks from the vectorizer, such as >> "vectorization is not beneficial and is not explicitly forced"

Re: [julia-users] Re: Article on `@simd`

2014-09-18 Thread Arch Robison
, so it also differs for a>b). > > Den onsdagen den 17:e september 2014 kl. 16:28:45 UTC+2 skrev Arch Robison: >> >> Thanks. Now fixed. >> >> On Wed, Sep 17, 2014 at 4:14 AM, Gunnar Farnebäck >> wrote: >> >>> In the section "The Loop Body Sh

Re: [julia-users] Re: Article on `@simd`

2014-09-18 Thread Arch Robison
ISPC is not only a an explicit vectorization language, but has some novel semantics, particularly for structures. Not only SOA vs. AOS, but the whole notion of "uniform" vs. "varying" fields of a structure is a new thing. A macro-based imitation might be plausible. On Wed, Sep 17, 2014 at 7:58 P

Re: [julia-users] Re: Article on `@simd`

2014-09-23 Thread Arch Robison
e Fechner wrote: > > Any idea when the vectorization of 64 bit double values will be supported? > > (I work a lot with 3D double vectors, they could be calculated with one > command > in the Haswell CPU's. ) > > On Wednesday, September 17, 2014 4:48:26 PM UTC+2, Arch R

[julia-users] Code to calculate a vast matrix product together?

2015-10-27 Thread Arch Robison
The "greedy" blog said "We want to write A*B and launch a thousand computations on a thousand machines, calculating a vast matrix product together." Has someone written the code for this yet? What's the *shortest *way to write it (will

[julia-users] Why does adding type assertion to field slow down this example?

2016-06-09 Thread Arch Robison
The following example exhibits performance that is counter-intuitive to me. Why? type fast x end type slow x :: Unsigned end function flog(y) s = 0.0 for i=1:100 s += sqrt(y.x) end s end for i=1:3 @time flog(fast(42)) @time flog(slow(42)) end Her

Re: [julia-users] Why does adding type assertion to field slow down this example?

2016-06-09 Thread Arch Robison
Sure looks like it. Thanks! On Thu, Jun 9, 2016 at 6:18 PM, Yichao Yu wrote: > On Thu, Jun 9, 2016 at 6:36 PM, Arch Robison > wrote: > > > > > > The following example exhibits performance that is counter-intuitive to > me. > > Why? > > I believe thi

[julia-users] Standard wrapper for global variable optimization hack?

2016-06-13 Thread Arch Robison
I'm revising the notes for my JuliaCon workshop, and wondering if there is a standard way/convention for the following hack to reduce the overhead of accessing a global variable. The hack is to replace a global variable, if known to always be bound to objects of the same type, with a const vari

Re: [julia-users] Standard wrapper for global variable optimization hack?

2016-06-13 Thread Arch Robison
Indeed the one-element vector case was what inspired my wrapper. I created the wrapper to avoid the run-time bounds check on the vector, though I suppose I could sprinkle @inbounds to eliminate it. On Mon, Jun 13, 2016 at 6:40 PM, Eric Forgy wrote: > Not sure if this is the best way (curious ab

[julia-users] Re: Standard wrapper for global variable optimization hack?

2016-06-14 Thread Arch Robison
Thanks Kristoffer for the suggestion of Ref. It indeed is the kind of wrapper I was looking for. Thanks Eric for catching my typo. Yes, it should be `const w = wrapper(0.0)`, with the w instead of x.

[julia-users] Re: Article on `@simd`

2014-10-28 Thread Arch Robison
Update: The recent Julia 0.3.2 release supports vectorization of Float64.

[julia-users] Julia takes 2nd place in "Delacorte Numbers" competition

2015-01-04 Thread Arch Robison
FYI, I won 2nd place in the recent Al Zimmerman programming contest "Delacorte Numbers ", using only Julia and a quad-core MonkeyStation Pro . Julia worked out well because it had: - intera

Re: [julia-users] Julia takes 2nd place in "Delacorte Numbers" competition

2015-01-05 Thread Arch Robison
. It would have been nice to share the table among the threads. On Mon, Jan 5, 2015 at 5:27 PM, Stefan Karpinski wrote: > Very nice. Would this problem benefit even more from multithreading? > > On Sun, Jan 4, 2015 at 12:35 PM, Arch Robison > wrote: > >> FYI, I won 2nd p

[julia-users] How to debug Pkg "failed to connect" issue?

2016-02-08 Thread Arch Robison
How do I go about debugging why the Julia package manager can't connect to Github? I've tried the usual firewall workarounds (see below). Either of the following works fine: git clone https://github.com/JuliaLang/METADATA.jl git clone git://github.com/JuliaLang/METADATA.jl But within Julia,

Re: [julia-users] How to debug Pkg "failed to connect" issue?

2016-02-09 Thread Arch Robison
, Yichao Yu wrote: > > On Mon, Feb 8, 2016 at 12:53 PM, Arch Robison > wrote: > > How do I go about debugging why the Julia package manager can't connect > to > > Github? I've tried the usual firewall workarounds (see below). Either > of > > the foll