Skip to content

Commit

Permalink
Whitespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Dec 14, 2024
1 parent e62ed17 commit 5edeef5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/bench/bench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ object Benchmarks extends Suite(t"Gossamer Benchmarks"):
deferCompilation:
import gossamer.*
Group(List(Person("Jack", 30))).show
.benchmark(warmup = 30000L, duration = 30000L)

. benchmark(warmup = 30000L, duration = 30000L)

test(t"Resolve a Debug instance"):
deferCompilation:
import gossamer.*
Group(List(Person("Jack", 30))).inspect
.benchmark(warmup = 30000L, duration = 30000L)

. benchmark(warmup = 30000L, duration = 30000L)
6 changes: 4 additions & 2 deletions src/core/gossamer-core.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ extension (bytes: Bytes)
bytes.map: b =>
val i = b&0xff
(if i%0x80 <= 0x20 || i == 0x7f then i + 0x100 else i).toChar
.mkString.tt

. mkString.tt

extension [TextType](text: TextType)
def cut[DelimiterType](delimiter: DelimiterType, limit: Int = Int.MaxValue)
Expand Down Expand Up @@ -309,7 +310,8 @@ extension (text: into Text)

for j <- 1 to n do
dist(j) = (old(j - 1) + (if text.s.charAt(i - 1) == other.s.charAt(j - 1) then 0 else 1))
.min(old(j) + 1).min(dist(j - 1) + 1)

. min(old(j) + 1).min(dist(j - 1) + 1)

for j <- 0 to n do old(j) = dist(j)

Expand Down

0 comments on commit 5edeef5

Please sign in to comment.