Skip to content

Conversation

@konsumlamm
Copy link
Contributor

@konsumlamm konsumlamm commented Sep 6, 2023

Closes #13.

I copied the code for Array for the most part. The new newArray doesn't separate the construction of the TVar#s and the construction of the Array# (unlike the old version), I'm not sure if that's a problem.

The benchmarks show that TBQueue gets a bit faster with this change.

Benchmark results
All
  concurrent spsc
    Chan:               OK (0.95s)
      317  ms ± 7.5 ms
    TChan:              OK (2.85s)
      189  ms ±  15 ms
    TQueue:             OK (34.34s)
      127  ms ± 9.7 ms
    TBQueue (unlifted): OK (0.48s)
      160  ms ±  15 ms
    TBQueue:            OK (0.62s)
      206  ms ±  19 ms
  concurrent mpmc
    Chan:               OK (35.09s)
      11.698 s ±  19 ms
    TChan:              OK (5.04s)
      734  ms ±  30 ms
    TQueue:             OK (1.63s)
      545  ms ±  45 ms
    TBQueue (unlifted): OK (17.37s)
      1.190 s ±  26 ms
    TBQueue:            OK (3.93s)
      1.300 s ± 123 ms
  bulk
    Chan:               OK (6.68s)
      443  ms ±  23 ms
    TChan:              OK (3.25s)
      462  ms ±  19 ms
    TQueue:             OK (1.00s)
      336  ms ±  19 ms
  burst
    Chan:               OK (2.92s)
      206  ms ±  18 ms
    TChan:              OK (3.50s)
      238  ms ±  11 ms
    TQueue:             OK (0.52s)
      177  ms ± 7.1 ms
    TBQueue (unlifted): OK (0.77s)
      257  ms ±  13 ms
    TBQueue:            OK (0.78s)
      263  ms ± 4.2 ms

@konsumlamm konsumlamm force-pushed the unbox-tarray branch 2 times, most recently from 6e0cf75 to 44ce81e Compare September 21, 2023 00:23
@bgamari
Copy link
Contributor

bgamari commented Sep 22, 2023

Can you add entries to the CHANGELOG describing this and your previous changes?

@bgamari bgamari merged commit e758017 into haskell:master Oct 5, 2023
@konsumlamm konsumlamm deleted the unbox-tarray branch October 5, 2023 21:30
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.

Unbox TArray

2 participants