Hi,

On Thu, Sep 10, 2015 at 5:16 PM, Vincent St-Amour <
[email protected]> wrote:

> [Re-adding dev. Please reply all in the future.]
>
>
Sorry. I was afraid the log files would annoy people.


> I'll look into `change-provide-fixups`, but it would be really helpful
> if you could share your problematic program, or at least a fragment that
> exhibits this behavior. Otherwise, I don't have a good example program
> to measure.


Here is a MWE:

#lang typed/racket
(require (for-syntax racket/syntax))

(define-syntax (structs stx)
  (syntax-case stx ()
    [(structs n)
     (with-syntax ([(name ...)
                    (for/list ([i (in-range (syntax->datum #'n))])
                      (format-id #'structs "struct-~a" i))]
                   [(fname ...)
                    (for/list ([i (in-range (syntax->datum #'n))])
                      (format-id #'structs "func-~a" i))])
       #'(begin
           (define-type (Union T)
             (U Number (name T) ...))
           (begin
             (struct (T) name
               ([x : (Union T)]))
             (define #:forall (T) (fname [x : (Union T)])
               (name x)))
           ...))]))

The approximate times I got are:

(structs 4) ;2s
(structs 5) ;7s
(structs 6) ;42s

Hope this helps and thanks in advance for your efforts.

Best,
António.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/CAJQmiZV5xxEC%3D0Zxvx5kvSZJfbNn3xC%3DqbR3U-ZagM7d4GCNaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to