Opened 16 years ago

Last modified 16 years ago

#2340 enhancement new

Special case inlineCallbacks for case where Deferred already has value

Reported by: itamarst Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:


The value of a Deferred can be extracted without addCallbacks. Having inlineCallbacks do this should speed it up. Obviously this breaks abstraction, but (only!) within context of t.i.defer that's probably fine.

Benchmarks I sent to jknight separately demonstrate this change speeds up this case dramatically, and slightly speeds up the other case (with a buggy implementation, but still).

Attachments (1) (5.1 KB) - added by itamarst 16 years ago.
Benchmarks for inlineCallbacks and friends

Download all attachments as: .zip

Change History (4)

comment:1 Changed 16 years ago by Jean-Paul Calderone

The benchmarks should be added to Twisted as well, of course. I think it would be good if they were actually the main focus of this ticket. This sounds like a good optimization, but specific optimization should be driven by the benchmarks, not just justified by them.

Changed 16 years ago by itamarst

Benchmarks for inlineCallbacks and friends

comment:2 Changed 16 years ago by itamarst

Cleaned up benchmarks are attached. They include the (buggy) optimization to inlineCallbacks.

comment:3 Changed 11 years ago by <automation>

Owner: jknight deleted
Note: See TracTickets for help on using tickets.