-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch release 1.2.3: * optimized kernel, better simd'ing * removed br…
…oadcasting for simpler code generation
- Loading branch information
1 parent
7013b77
commit c9d1013
Showing
5 changed files
with
70 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Trapz" | ||
uuid = "592b5752-818d-11e9-1e9a-2b8ca4a44cd1" | ||
authors = ["Francesco Alemanno <[email protected]>"] | ||
version = "1.2.2" | ||
version = "1.2.3" | ||
|
||
[compat] | ||
julia = "1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using BenchmarkTools,Trapz | ||
|
||
vx=range(0,1,length=100) | ||
vy=range(0,2,length=200) | ||
vz=range(0,3,length=300) | ||
M=[x^2+y^2+z^2 for x=vx,y=vy,z=vz] | ||
|
||
@benchmark trapz($(vx,vy,vz),$M) | ||
|
||
@benchmark trapz($(vy, vz),$M) | ||
|
||
@benchmark trapz($vy,$M,$2) | ||
|
||
@benchmark trapz($(vz,vy,vx),$M,$(3,2,1)) | ||
|
||
using PyCall | ||
|
||
@pyimport numpy as np | ||
|
||
timenumpy = @belapsed np.trapz(np.trapz(np.trapz($M,$vz),$vy),$vx) | ||
|
||
timejulia = @belapsed trapz($(vx,vy,vz),$M) | ||
|
||
how_faster=timenumpy/timejulia | ||
|
||
print("Trapz.jl is ~ ",how_faster," times faster than numpy's trapz") # 7.31 times 22 march 2020 |
Oops, something went wrong.