Thanks everyone. I guess I misread the docs. Great to hear re:
caching. Guess I wasn't screwing things up as I momentarily feared. :)
Sam Tobin-Hochstadt writes:
> Here are some quick numbers on the traditional Racket VM:
>
> ```
>> (define v (build-list 1000 values))
>> (time (list? v))
>
Here are some quick numbers on the traditional Racket VM:
```
> (define v (build-list 1000 values))
> (time (list? v))
cpu time: 47 real time: 47 gc time: 0
#t
> (time (list? v))
cpu time: 31 real time: 31 gc time: 0
#t
> (time (list? v))
cpu time: 13 real time: 13 gc time: 0
#t
> (time (list?
>From the expansion result, match does check whether the inspected
value is a list using list?. But at least for the current version of
Racket (and the C VM), list? is handled specially and ``effectively
takes constant time due to internal caching.'' (quoted from:
https://docs.racket-lang.org/refer
> On Oct 29, 2019, at 12:41, Christopher Lemmer Webber
> wrote:
>
> But the documentation says that the `list?` predicate is O(n).
I’m not sure where you’re seeing that, but the documentation actually says just
the opposite. Specifically, it says this:
> This procedure effectively takes const
Imagine the following code:
(let lp ([items '(1 2 3 4 5)])
(match items
[(list head rest ...)
(cons (* head 2)
(lp rest))]))
My gut feeling is "oh, this is just O(n) because it's pulling the top
off the list quite efficient."
But then I realized that:
(match '(1 2 3 4
Hi All,
Thanks for the information + various ideas.
The various suggest constructs provide a helpful view on different corners
of the language, but all appear to have the characteristic of throwing out
the existing hashtable structure from the map and then reconstructing it
from scratch for the ne
This might be too minimal of an example.
It looks like typed Racket doesn't want you to use Typed Racket types in certain
contexts.
To implement the functionality I think you want from that example, I would
write the following
#lang turnstile
(require (only-in (prefix-in tr: typed/racket)
Hi,
I am attempting to expand to typed/racket from a custom language through
#lang turnstile. Unfortunately, the macro stepper isn't helping me much as
to how I should do that.
So far, this minimal example:
#lang turnstile
(require (only-in (prefix-in tr: typed/racket)
tr:#%m
I haven't been able to get Vulkan going on my machines, so I can't run
your code enough to offer reliable advice.
Still, I wonder whether making the callback atomic has any effect.
To make the callback atomic:
* Change the definition of `_PFN_vkDebugReportCallbackEXT` to add
`#:atomic? #t` aft
9 matches
Mail list logo