Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 32d965ae authored by hhakim's avatar hhakim
Browse files

Optimize Faust::Transform*::multiply(MatDense), multiply(Vect)

- Passing argument by ref. instead of by copy.
- Using std::move to return Vect.
- Overloads of Transform*::multiply to work directly on pointer for input and output when possible (avoiding to create a Vect which implies a copy).

===== Tiny benchmark
# before opt:
 …  build  wrapper  python  python3 ./test_mul_matdense.py
time F@M: 73.59880792200056
 …  build  wrapper  python  python3 ./test_mul_matdense.py
time F@M: 73.55839103899962
 …  build  wrapper  python  python3 ./test_mul_matdense.py
time F@M: 73.08681796200017
 …  build  wrapper  python  python3 ./test_mul_matdense.py
time F@M: 74.9565577809999
# after opt
 …  build  wrapper  python  python3 ./test_mul_matdense.py
time F@M: 68.73776014800023
 …  build  wrapper  python  python3 ./test_mul_matdense.py
time F@M: 66.158199126

# before opt
 …  build  wrapper  python  python3 ./test_mul_vec.py
time F@v: 12.114531449999959
 …  build  wrapper  python  python3 ./test_mul_vec.py
time F@v: 11.836395657000025
 # after opt
  …  build  wrapper  python  python3 ./test_mul_vec.py
time F@v: 6.513644815999953
 …  build  wrapper  python  python3 ./test_mul_vec.py
time F@v: 6.486405678999972
==============

test_mul_matdense.py:
https://gitlab.inria.fr/faustgrp/faust/-/snippets/702

test_mul_vec.py:
https://gitlab.inria.fr/faustgrp/faust/-/snippets/703
parent b4c6ee08
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment