-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark Truffle "add" for arrow-language and Column.+
#10056
Comments
Jaroslav Tulach reports a new STANDUP for yesterday (2024-06-03): Progress: - arrow language
|
Jaroslav Tulach reports a new STANDUP for yesterday (2024-06-04): Progress: -
|
While working on #10056 I realized the names of method and closure nodes are incomprehensible to anyone. This PR replaces the infamous `<anonymous>` with a name hinting where the method actually is. # Important Notes I assume this change will be visible not only in IGV, but also in _stacktraces_ and we may need to adjust few tests.
|
Jaroslav Tulach reports a new STANDUP for yesterday (2024-06-06): Progress: - Hands on IGV lab! https://drive.google.com/file/d/11o2eHSy0Ptux0SWW9JpRiGQp5wtVZshh/view
|
Jaroslav Tulach reports a new STANDUP for yesterday (2024-06-07): Progress: - Hands on IGV lab recording: https://drive.google.com/file/d/11o2eHSy0Ptux0SWW9JpRiGQp5wtVZshh/view?usp=sharing
|
Prototype of #10056 showing `+` operation implemented in the _Arrow language_.
There already is an implementation of arrow-language written by @hubertp. There is an interest in cleaning up the current Storage architecture particularly to clearly separate storage from operations. @JaroslavTulach claims that the most efficient (and at the end also simplest) implementation can be achieved by using Truffle. Let's run an experiment to verify such a claim!
The documentation of
Column.+
mentions two examples:let's reimplement them with the Arrow language. Then let's generate a million item column and benchmark them against each other.
API
The Arrow language already supports two operations:
new[type]
andcast[type]
. E.g. one can writenew[Int32]
and gets a function that can be called to allocate array of provided (as function argument) size. Let's introduce new syntax:+[type]
parsing such statement is going to produce a function (e.g.
isExecutable
object) that takes two arguments. When invoked, it'd check whether both argumentshasArrayElements
. If so, they have to have the samegetArraySize()
. Then the function would createnew[type]
for appropriate size and filled the arrow column with added content of both arrays. If one (or both) arguments are scalars, then the same behavior asscalar_plus
would "happen".One of the important steps in the implementation are conversions. The values need of arguments need to be converted to the target
type
of the resulting array. Such conversions can benefit from Truffle@Specialization
and effectively compute the optimal result.Expected Result
After final benchmarking we shall see that the Truffle results are faster, yet the code remains simple.
The text was updated successfully, but these errors were encountered: