-
Notifications
You must be signed in to change notification settings - Fork 318
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
Add Table.take
and Table.drop
functions to In-Memory table
#3647
Add Table.take
and Table.drop
functions to In-Memory table
#3647
Conversation
166d31d
to
c60f4e1
Compare
a27d51b
to
cb29c33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed a couple of minor comments:
- Lets comment why we are keeping Sample in Vector
- Lets add Index_Sub_Range to Standard.Base and remove the other imports
Worth testing performance of Interface vs Record
I added the comment.
As discussed, I cannot do that due to a bug. We can do it once the bug is resolved. |
As requested, I wrote the following code: package org.enso.base;
import java.util.List;
public class Foo {
public record TestRecord(long x, long y) {}
public interface TestInterface {
long x();
long y();
}
public static long record_product(List<TestRecord> records) {
long result = 0;
for (TestRecord record : records) {
result += record.x * record.y;
}
return result;
}
public static long interface_product(List<TestInterface> interfaces) {
long result = 0;
for (TestInterface iface : interfaces) {
result += iface.x() * iface.y();
}
return result;
}
}
The results on my machine were following:
So, it seems that after warm-up the conversion to records is actually faster than the interfaces, but it is slower in the first iterations. This makes the decision unclear - in Enso we often want the first runs to be fast too. |
a32d691
to
9cca29e
Compare
something really weird is going on...
9cca29e
to
ffa4454
Compare
Pull Request Description
Implements https://www.pivotaltracker.com/story/show/182307347
Important Notes
Checklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide build
and./run ide watch
.