We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was benchmarking cl-cxx-eigen, numcl and your lib.. with the following code:
(ql:quickload :cxx-eigen) (cxx-eigen:init) (defvar x (cxx-eigen:create-matrix2 3 3)) (defvar y (cxx-eigen:create-matrix2 3 3)) (defparameter A #1a(1.0d0 2.0d0 3.0d0 4.0d0 5.0d0 6.0d0 4.0d0 5.0d0 6.0d0 4.0d0 5.0d0 6.0d0 4.0d0 5.0d0 6.0d0 4.0d0 5.0d0 6.0d0 7.0d0 8.0d0 9.0d0)) (defparameter B #1a(1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0 1.0d0)) (cxx-eigen:m.set-from-array x A 7 3 ) (cxx-eigen:m.set-from-array y B 3 7 ) (cxx-eigen:m.print x) (cxx-eigen:m.print y) ;; numcl part (ql:quickload :numcl) (defparameter An (numcl:reshape (numcl:asarray A) '(7 3))) (defparameter Bn (numcl:reshape (numcl:asarray B) '(3 7))) (numcl:matmul An Bn) ;; peta part (ql:quickload :petalisp) (ql:quickload :petalisp.examples) (defparameter Al (petalisp:lazy-reshape A (petalisp:~ 7 petalisp:~ 3))) (defparameter Bl (petalisp:lazy-reshape B (petalisp:~ 3 petalisp:~ 7))) (defun present (&rest arrays) (format t "~{~& => ~A~}" (petalisp:compute-list-of-arrays arrays))) (present Al) (present Bl) (ql:quickload :the-cost-of-nothing) (defparameter cnt 20) (defparameter r (numcl:asarray (make-array '(7 7) :element-type 'double-float))) (the-cost-of-nothing:benchmark (dotimes (i cnt) (petalisp.examples.linear-algebra:matmul Al Bl))) (the-cost-of-nothing:benchmark (dotimes (i cnt) (cxx-eigen:m* x y))) (the-cost-of-nothing:benchmark (dotimes (i cnt) (numcl:matmul An Bn r)))
Results:
petalisp
numcl
cpp
>10x
I want to measure the time of petalisp without allocations.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was benchmarking cl-cxx-eigen, numcl and your lib..
with the following code:
Results:
petalisp
is faster than non-inplace version ofnumcl
multiplication.cpp
data boxing/unboxing was>10x
faster than inplace version ofnumcl
multiplication.I want to measure the time of
petalisp
without allocations.The text was updated successfully, but these errors were encountered: