Overview
| Artifact ID: | 1b89364d0f7ffb80e48df39871dd32e546e580d0 |
|---|---|
| Ticket: | 2868499fffffffffffffffffffffffffffffffff
TIP #348: Substituted errorStack |
| User & Date: | ferrieux on 2009-10-23 08:03:15 |
Changes
- icomment:
Extended patch adds bit value 4 as "flat list", ie errorstack is built as 2 foo bar 1 baz 2 gnu gnats instead of {foo bar} baz {gnu gnats} Hence: use=0 : pristine use=1 : info errorstack use=2 : + dict use=5 : 1 + flatlist use=6 : 2 + flatlist Timings below: Case: Ten-fold catch ladder use=0 -> 101.3854 microseconds per iteration Case: Ten-fold catch ladder use=1 -> 106.2653 microseconds per iteration Case: Ten-fold catch ladder use=2 -> 106.8439 microseconds per iteration Case: Ten-fold catch ladder use=5 -> 103.5229 microseconds per iteration Case: Ten-fold catch ladder use=6 -> 103.7669 microseconds per iteration Case: Single Catch with opt dict use=0 -> 25.814 microseconds per iteration Case: Single Catch with opt dict use=1 -> 26.2905 microseconds per iteration Case: Single Catch with opt dict use=2 -> 27.0002 microseconds per iteration Case: Single Catch with opt dict use=5 -> 26.0665 microseconds per iteration Case: Single Catch with opt dict use=6 -> 26.783 microseconds per iteration Conclusion: while the gain for a tight catch loop is negligible, for a ten-fold catch ladder building a long errorstack it is substantial: the flatlist roughly divides the overhead by three. However, the flatlist is a bit less convenient for the programmer. It could be postprocessed into a nested list in [info errorstack] but not int the options dict... - login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"