Skip to content

Conversation

@ychenfo
Copy link
Member

@ychenfo ychenfo commented Sep 16, 2025

TODO

  • Move nofibs to the benchmark subproject
  • Fix the paths


def uid =
import Result.*
val uidValue = ResultId(System.identityHashCode(this))
Copy link
Contributor

Choose a reason for hiding this comment

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

These are not guaranteed to be unique. Use the Uid definitions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 14190b1

def rewriteOneBlk(b: Block) = b match
case Assign(lhs, Value.Lam(params, body), rest) if !lhs.isInstanceOf[TempSymbol] =>
val newSym = BlockMemberSymbol(lhs.nme, Nil,
val newSym = BlockMemberSymbol(lhs.nme, syntax.Tree.DummyTermDef(syntax.Fun) :: Nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

Document why the dummy Fun.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in ba5c7b8

val sym = BlockMemberSymbol("lambda", Nil, nameIsMeaningful = false)
val sym = BlockMemberSymbol(
"lambda",
syntax.Tree.DummyTermDef(syntax.Fun) :: Nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

Document why the dummy Fun.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in ba5c7b8

case _ => N
val singleCallBms = BlockMemberSymbol(d.sym.nme + "$", Nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

👎

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 362e212

Comment on lines 314 to 316
args(fs): args =>
val tmpSym = TempSymbol(N, "arr")
Assign(tmpSym, Value.Arr(mut = false, args), k(Value.Ref(tmpSym)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really needed? At the very least, we shouldn't do it when the array is immediately returned or already assigned to a variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in #338

Comment on lines +516 to +519
fun insertCompact(mif_s, ls) = if mif_s is [mif, s] then
fun insert(x, ls) = if ls is
Nil then x :: Nil
y :: ys then if x > y then y :: insert(x, ys) else x :: y :: ys

Choose a reason for hiding this comment

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

Here x > y converts both x and y (which are JS objects of class MoveInFull) to string and perform string comparison. It should compare field by field instead

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the catch. @ychenfo let's remember to fix this when we come back to the PR.

open Benchmark


:silent
Copy link

Choose a reason for hiding this comment

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

I'd forgotten to fix this in my PR, but these :silents could be moved to a single one in the header.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. @ychenfo pls address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants