I am trying to use the SortedSet collection to search for the range associated to an specific value. For example if the SortedSet has the pairs (1, 9), (10, 19) and (20, 29), searching for the number 23 will find the pair (20, 29). Here is my implementation that takes 80 seconds to execute while the same implementation in Java using TreeSet takes half a second. Is there a problem with my implementation?

```
open System.Collections.Generic
let s = SortedSet<int*int>()
for i in 0 .. 10 .. 100000 do
s.Add (i, i+9) |> ignore
let mutable c = 0
for x in 0 .. 100000 do
let upper = s.GetViewBetween ((Int32.MinValue, Int32.MinValue), (x, Int32.MaxValue))
let a, b = Seq.tryLast upper |> Option.defaultValue (-1, -1)
if a <= x && x <= b then
c <- c + 1
printfn "%A" c
```

Thank you,