summaryrefslogtreecommitdiffstats
path: root/model-integration/src/test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-20 12:52:49 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2024-01-20 12:52:49 +0100
commit173e95cac59728ca14a2a44902255c72ad982ca3 (patch)
treea07fee4b5e4e3eecc9e34ed92e3908408349595a /model-integration/src/test
parentc18b5805006b83efbeb9fc881e1658a57be28e56 (diff)
- Put the inner loops in separate methods. This improves ability to inline.
- Use Buffer.get(int index) instead of Buffer.get(). That avoids a write. - Use int as loop variable. - This brings the splade perfoamnce test down from 8s to 7s - TensorConverter.toVespaTensor more than doubled speed.
Diffstat (limited to 'model-integration/src/test')
-rw-r--r--model-integration/src/test/java/ai/vespa/embedding/SpladeEmbedderTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/model-integration/src/test/java/ai/vespa/embedding/SpladeEmbedderTest.java b/model-integration/src/test/java/ai/vespa/embedding/SpladeEmbedderTest.java
index 82998b56fb5..b48051814ab 100644
--- a/model-integration/src/test/java/ai/vespa/embedding/SpladeEmbedderTest.java
+++ b/model-integration/src/test/java/ai/vespa/embedding/SpladeEmbedderTest.java
@@ -49,7 +49,7 @@ public class SpladeEmbedderTest {
String text = "what was the manhattan project in this context it was a secret project to develop a nuclear weapon in world war" +
" ii the project was led by the united states with the support of the united kingdom and canada";
Long now = System.currentTimeMillis();
- int n = 1000; // Takes around 8s on Intel core i9 2.4Ghz (macbook pro, 2019)
+ int n = 1000; // Takes around 7s on Intel core i9 2.4Ghz (macbook pro, 2019)
for (int i = 0; i < n; i++) {
assertEmbed("tensor<float>(t{})", text, indexingContext);
}