Skip to content

Instantly share code, notes, and snippets.

View amordo's full-sized avatar
💭
🍕

amordo

💭
🍕
View GitHub Profile
@amordo
amordo / Test.scala
Created May 21, 2026 13:18
Split RegionAllocation benchmark into separate mains and use Long checksums - Added RegionAllocationBenchmarkHelpers to hold shared types and helper functions. - Split the single RegionAllocationBenchmark into RegularBenchmark, ZoneBenchmark, and SafeZoneBenchmark. - Converted accumulator and result types from Int to Long to avoid 32-bit overfl…
package scala.scalanative.benchmarks
import scala.language.experimental.captureChecking
import scala.scalanative.unsafe._
import scala.scalanative.memory.SafeZone
import scala.scalanative.runtime.SafeZoneAllocator.allocate
object RegionAllocationBenchmarkHelpers {
final class Node(val value: Int)