[
https://issues.apache.org/jira/browse/BEAM-10549?focusedWorklogId=469422&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-469422
]
ASF GitHub Bot logged work on BEAM-10549:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Aug/20 21:37
Start Date: 11/Aug/20 21:37
Worklog Time Spent: 10m
Work Description: saavannanavati commented on pull request #12352:
URL: https://github.com/apache/beam/pull/12352#issuecomment-672292191
The microbenchmark results!
It looks like `performance_runtime_type_check` is ~10% slower than no type
check, but significantly faster than `runtime_type_check` whose time complexity
is linear with respect to the input size.
```1 Element
-- Simple Types
---- 9.42 sec (No Type Check)
---- 8.01 sec (Runtime Type Check)
---- 7.70 sec (Performance Runtime Type Check)
-- Nested Types
---- 9.10 sec (No Type Check)
---- 9.79 sec (Runtime Type Check)
---- 7.59 sec (Performance Runtime Type Check)
1001 Elements
-- Simple Types
---- 11.78 sec (No Type Check)
---- 65.04 sec (Runtime Type Check)
---- 20.00 sec (Performance Runtime Type Check)
-- Nested Types
---- 20.26 sec (No Type Check)
---- 74.79 sec (Runtime Type Check)
---- 25.84 sec (Performance Runtime Type Check)
2001 Elements
-- Simple Types
---- 23.40 sec (No Type Check)
---- 118.87 sec (Runtime Type Check)
---- 25.75 sec (Performance Runtime Type Check)
-- Nested Types
---- 32.52 sec (No Type Check)
---- 135.38 sec (Runtime Type Check)
---- 36.19 sec (Performance Runtime Type Check)
3001 Elements
-- Simple Types
---- 29.79 sec (No Type Check)
---- 174.64 sec (Runtime Type Check)
---- 24.85 sec (Performance Runtime Type Check)
-- Nested Types
---- 42.14 sec (No Type Check)
---- 193.98 sec (Runtime Type Check)
---- 45.33 sec (Performance Runtime Type Check)
4001 Elements
-- Simple Types
---- 34.66 sec (No Type Check)
---- 225.57 sec (Runtime Type Check)
---- 37.28 sec (Performance Runtime Type Check)
-- Nested Types
---- 51.87 sec (No Type Check)
---- 260.55 sec (Runtime Type Check)
---- 56.28 sec (Performance Runtime Type Check)
5001 Elements
-- Simple Types
---- 41.14 sec (No Type Check)
---- 277.93 sec (Runtime Type Check)
---- 31.16 sec (Performance Runtime Type Check)
-- Nested Types
---- 63.14 sec (No Type Check)
---- 296.25 sec (Runtime Type Check)
---- 41.02 sec (Performance Runtime Type Check)
6001 Elements
-- Simple Types
---- 30.41 sec (No Type Check)
---- 292.06 sec (Runtime Type Check)
---- 50.29 sec (Performance Runtime Type Check)
-- Nested Types
---- 43.29 sec (No Type Check)
---- 378.11 sec (Runtime Type Check)
---- 75.43 sec (Performance Runtime Type Check)
7001 Elements
-- Simple Types
---- 42.78 sec (No Type Check)
---- 288.78 sec (Runtime Type Check)
---- 39.87 sec (Performance Runtime Type Check)
-- Nested Types
---- 54.35 sec (No Type Check)
---- 318.59 sec (Runtime Type Check)
---- 56.68 sec (Performance Runtime Type Check)
8001 Elements
-- Simple Types
---- 41.48 sec (No Type Check)
---- 362.18 sec (Runtime Type Check)
---- 62.33 sec (Performance Runtime Type Check)
-- Nested Types
---- 60.65 sec (No Type Check)
---- 501.25 sec (Runtime Type Check)
---- 96.24 sec (Performance Runtime Type Check)
9001 Elements
-- Simple Types
---- 64.16 sec (No Type Check)
---- 370.09 sec (Runtime Type Check)
---- 62.71 sec (Performance Runtime Type Check)
-- Nested Types
---- 83.78 sec (No Type Check)
---- 557.60 sec (Runtime Type Check)
---- 107.29 sec (Performance Runtime Type Check)```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 469422)
Time Spent: 5h 20m (was: 5h 10m)
> Improve Runtime Type Checking Performance
> -----------------------------------------
>
> Key: BEAM-10549
> URL: https://issues.apache.org/jira/browse/BEAM-10549
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: Saavan Nanavati
> Assignee: Saavan Nanavati
> Priority: P2
> Time Spent: 5h 20m
> Remaining Estimate: 0h
>
> The performance gain will come from moving the runtime type check from a
> decorator to OperationCounters.
>
> This has (2) improvements:
> # Cython optimizable
> # Sampling is a built-in feature
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)