scala-wasm icon indicating copy to clipboard operation
scala-wasm copied to clipboard

Efficient type inclusion test

Open tanishiking opened this issue 1 year ago • 0 comments

Current .isInstanceOf[<interface>] implementation walk through the itables, which requires O(N), it would be nice if we can test it with O(1) with small space requirements.

https://github.com/tanishiking/scala-wasm/blob/0b446827bfe04181413443b235dcfcb4398073cc/wasm/src/main/scala/ir2wasm/HelperFunctions.scala#L700-L707

You can find the related paper here https://github.com/tanishiking/scala-wasm/issues/27#issuecomment-2008252049

tanishiking avatar Mar 29 '24 06:03 tanishiking