# Have a try Julia v1.4.2 for arm32bit

**URL:** <https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284>\
**Category:** Tooling\
**Tags:** announcement\
**Created:** [May 27, 2020, 7:14pm UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284 "2020-05-27T19:14:17Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [June 6, 2020, 2:51pm UTC](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284/11 "2020-06-06T14:51:13Z")

</div>

- I’ve updated the Dockerfile above by adding keyword argumnet `precompile_execution_file`.  
It will improve performance.

See [https://julialang.github.io/PackageCompiler.jl/dev/examples/plots/](https://julialang.github.io/PackageCompiler.jl/dev/examples/plots/) fore more information.

```julia
FROM terasakisatoshi/jlcross:rpizero-v1.4.2

RUN julia -e 'using Pkg; \
    Pkg.add(["PackageCompiler", "StaticArrays"]); \
    # precompile pacakges; \
    using PackageCompiler, StaticArrays'

RUN mkdir /sysimages

RUN echo 'using StaticArrays; s1=SVector{3}(0.0,0.0,0.0); s2=SVector{3}(rand(3)...); s1+s2' >> /home/pi/executionfile.jl
RUN julia /home/pi/executionfile.jl

RUN julia -e '\
using PackageCompiler; \
import PackageCompiler:march, default_app_cpu_target; \
# To specialize in Raspberry Pi zero, \
# we will override `march` and `default_app_cpu_target` \
march()=nothing; \
default_app_cpu_target() = "arm1176jzf-s"; \
create_sysimage([:StaticArrays], precompile_execution_file="/home/pi/executionfile.jl", sysimage_path="/sysimages/sarrays.so"); \
'

RUN julia -e '\
@time using StaticArrays; \
@time s1=SVector{3}(rand(3)...); \
@time s2=SVector{3}(rand(3)...); \
@time s1+s2;\
'

RUN julia -J/sysimages/sarrays.so -e '\
@time using StaticArrays; \
@time s1=SVector{3}(rand(3)...); \
@time s2=SVector{3}(rand(3)...); \
@time s1+s2;\
'

```

```julia
$ docker build -t sample .

```

will output …

```julia
...
...
...
Step 7/8 : RUN julia -e '@time using StaticArrays; @time s1=SVector{3}(rand(3)...); @time s2=SVector{3}(rand(3)...); @time s1+s2;'
 ---> Running in 04803b0cf08e
  8.666841 seconds (2.63 M allocations: 97.241 MiB)
  4.802351 seconds (527.82 k allocations: 23.474 MiB, 0.66% gc time)
  0.000365 seconds (6 allocations: 224 bytes)
  2.840873 seconds (275.62 k allocations: 10.468 MiB, 0.30% gc time)
Removing intermediate container 04803b0cf08e
 ---> d272f875c9e9
Step 8/8 : RUN julia -J/sysimages/sarrays.so -e '@time using StaticArrays; @time s1=SVector{3}(rand(3)...); @time s2=SVector{3}(rand(3)...); @time s1+s2;'
 ---> Running in 9b1244590691
  0.014529 seconds (528 allocations: 17.688 KiB)
  0.242853 seconds (253 allocations: 32.297 KiB)
  0.000339 seconds (6 allocations: 224 bytes)
  0.000107 seconds (1 allocation: 32 bytes)
Removing intermediate container 9b1244590691
 ---> d0b825ef3d9d
Successfully built d0b825ef3d9d

```

---

_[View the full topic](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284)._
