Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Nov 15, 2024
1 parent c3f9c61 commit 2182082
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
36 changes: 36 additions & 0 deletions jsSite/src/BenchmarkPlots.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,40 @@ object BenchmarkPlots:
write(thePlot)
end andBooleanBenchmark

def OrBooleanBenchmark =
val thePlot = BenchmarkPlotElements.schema ++
BenchmarkPlotElements.data("../../benchmarks/benchmark_history.json") ++
(transform =
BenchmarkPlotElements.transform(
List("OrBooleanBenchmark.or_loop", "OrBooleanBenchmark.or_vec")
)
) ++
(vconcat =
List(
BenchmarkPlotElements.layer(3, "len"),
BenchmarkPlotElements.layer(128, "len"),
BenchmarkPlotElements.layer(100000, "len")
)
)
write(thePlot)
end OrBooleanBenchmark

def lteBenchmark =
val thePlot = BenchmarkPlotElements.schema ++
BenchmarkPlotElements.data("../../benchmarks/benchmark_history.json") ++
(transform =
BenchmarkPlotElements.transform(
List("LogicalBenchmark.lte_vec", "LogicalBenchmark.lte_loop")
)
) ++
(vconcat =
List(
BenchmarkPlotElements.layer(3, "len"),
BenchmarkPlotElements.layer(128, "len"),
BenchmarkPlotElements.layer(100000, "len")
)
)
write(thePlot)
end lteBenchmark

end BenchmarkPlots
17 changes: 17 additions & 0 deletions site/docs/_docs/benchmarks/booleans.mdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ import vecxt.facades.*
showJsDocs.fromSpec(BenchmarkPlots.andBooleanBenchmark, node)

```
Doing or operations

```scala mdoc:js sc:nocompile
import vecxt.plot.*
import vecxt.facades.*
showJsDocs.fromSpec(BenchmarkPlots.OrBooleanBenchmark, node)

```
Finally a double comparison, resulting in a boolean array.

```scala mdoc:js sc:nocompile
import vecxt.plot.*
import vecxt.facades.*
showJsDocs.fromSpec(BenchmarkPlots.lteBenchmark, node)

```


# Conclusion
Boolean processing gains massive benefits from SIMD.

0 comments on commit 2182082

Please sign in to comment.