This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>title</title> | |
<link rel="stylesheet" href="style.css"> | |
<SCRIPT SRC="../ganja.js"></SCRIPT> | |
</head> | |
<body> |
This file contains hidden or 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
using Grassmann; | |
@basis D"1,1,1,0"; | |
P = [ rand()*v124 + rand()*v134 + rand()*v234 + v123 for i=1:1000 ]; | |
L = [ rand()*v12 + rand()*v13 + rand()*v14 + rand()*v23 + rand()*v24 + rand()*v34 for i=1:1000 ]; | |
A = [ rand() for i=1:1000]; | |
test2(L,A,P) = (LA = exp.(L.*A); LA.*P.*.~LA) | |
@time begin for j in 1:1000; test2(L,A,P); end; end; | |
# Checked with the Grassmann author - this setup re-allocates but our non-allocating tests were slower. |