For other reasons, I have a version of TR which looks at how long type
inference is taking, and that's clearly a big culprit. Almost all of the
time for `(structs 6)` is in a few calls to inference. Unfortunately, this
doesn't yet give me a way to fix it. Based on the very high GC times, I
think there's a lot too much substitution going on here, which is something
I'm looking to fix in Typed Racket generally.

Sam

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

> Antonio,
>
> That's weird. With that example, I do see the timings you mentioned, but
> if I turn on TR's timing logging, I see that almost all the time is
> being spent in pass 1 of the typecheck. I.e., in a different place than
> your original example, way earlier in the TR implementation.
>
> That makes me suspect that this new example exhibits a different issue,
> which is less likely to be related to the original bug you reported.
>
> Vincent
>
>
>
> On Thu, 10 Sep 2015 16:14:43 -0500,
> Antonio Leitao wrote:
> >
> > 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/m2k2ryc4z4.wl-stamourv%40eecs.northwestern.edu
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAK%3DHD%2BZ%2B_j98os_ecZOWuRRqUK3rbHrZc1SCEwrcDSMPoviS6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to