goankur commented on code in PR #13572:
URL: https://github.com/apache/lucene/pull/13572#discussion_r1685196099


##########
lucene/core/build.gradle:
##########
@@ -14,12 +14,59 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+plugins {
+  id "c"
+}
 
 apply plugin: 'java-library'
+apply plugin: 'c'
 
 description = 'Lucene core library'
+model {
+  toolChains {
+    gcc(Gcc) {
+      target("linux_aarch64"){
+        path '/usr/bin/'
+        cCompiler.executable 'gcc10-cc'
+        cCompiler.withArguments { args ->
+          args << "--shared"
+               << "-O3"
+               << "-march=armv8.2-a+dotprod"

Review Comment:
   I tried `-march=native` on an `m7g.4xlarge` (Graviton3) instance type, OS, 
JDK, GCC were unchanged. `dot8s` and `vdot8s` are now `~3.5x` faster than java 
implementation, compared to being `10x` better on `m6g.4xlarge` (Graviton2)
   
   Benchmark   |    (size)   | Mode | Cnt |  Score |  Error |  Units
   ---|---|---|---|---|---|---
   VectorUtilBenchmark.binaryDotProductVector   |  768 | thrpt  |  15 | 10.570 
| ± 0.003 | ops/us
   VectorUtilBenchmark.dot8s          |            768  | thrpt  | 15 | 37.659  
| ± 0.422 | ops/us
   VectorUtilBenchmark.vdot8s         |            768  | thrpt  |  15 | 37.123 
| ± 0.237  | ops/us



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to