Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
skyz1 committed Aug 1, 2023
1 parent bfdab5a commit 3485fb8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions compiler/vm/src/heap/object_inline/int.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use super::{InlineObject, InlineObjectTrait};
use crate::heap::Int::Heap as OnHeap;
use crate::heap::Int::Inline as Inlined;
use crate::{
heap::{object_heap::HeapObject, Heap, Int, Tag},
utils::{impl_debug_display_via_debugdisplay, impl_eq_hash_ord_via_get, DebugDisplay},
Expand Down Expand Up @@ -95,7 +93,7 @@ macro_rules! operator_fn {
pub fn $name(self, heap: &mut Heap, rhs: Int) -> Int {
let lhs = self.get();
match rhs {
Inlined(rhs) => rhs
Int::Inline(rhs) => rhs
.try_get()
.and_then(|rhs| $inline_operation(lhs, rhs))
.map(|it| Int::create(heap, it))
Expand All @@ -105,7 +103,7 @@ macro_rules! operator_fn {
$bigint_operation(BigInt::from(lhs), rhs.get()),
)
}),
OnHeap(rhs) => {
Int::Heap(rhs) => {
Int::create_from_bigint(heap, $bigint_operation(BigInt::from(lhs), rhs.get()))
}
}
Expand Down

1 comment on commit 3485fb8

@jwbot
Copy link
Collaborator

@jwbot jwbot commented on 3485fb8 Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiler

Benchmark suite Current: 3485fb8 Previous: 83cb450 Ratio
Time: Compiler/hello_world 24121933 ns/iter (± 1547248) 24982559 ns/iter (± 3412713) 0.97
Time: Compiler/fibonacci 204981691 ns/iter (± 10304323) 222455421 ns/iter (± 11086515) 0.92
Time: VM Runtime/hello_world 63600 ns/iter (± 18605) 70950 ns/iter (± 35084) 0.90
Time: VM Runtime/fibonacci/15 542684539 ns/iter (± 38129970) 640840662 ns/iter (± 16354893) 0.85
Time: VM Runtime/PLB/binarytrees/6 2640030679 ns/iter (± 108587208) 2915153673 ns/iter (± 54214207) 0.91

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.