Summary: | dynamic protocol bindings | ||
---|---|---|---|
Product: | XCB | Reporter: | Havoc Pennington <hp> |
Component: | Protocol | Assignee: | xcb mailing list dummy <xcb> |
Status: | RESOLVED MOVED | QA Contact: | xcb mailing list dummy <xcb> |
Severity: | normal | ||
Priority: | medium | Keywords: | patch |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
hacky xcb_send_request_dynamic just to get initial idea of perf/size impact
benchmark used with previous patch |
Description
Havoc Pennington
2010-08-22 19:18:40 UTC
Created attachment 38254 [details] [review] hacky xcb_send_request_dynamic just to get initial idea of perf/size impact Patch reduces xcb_create_window() to a one-line function in a simpleminded way. This isn't introspection in a meaningful sense, just a cheap way to see if dynamic marshaling is small or slow. The basic results are: * the function comes out around 20 bytes smaller, but the separate description of how to marshal is about 20 bytes long, so no size win or lose. * therefore the only size win would be to drop the wrapper functions from the library entirely, replacing them with inline functions in the header that just added type safety/convenience to xcb_send_request_dynamic() * the marshaling is about 1.7 times slower. this is just creating the iovecs, does not include writing to the socket, so 1.7 times is the worst possible slowdown (if you have infinitely fast IO) rather than a real world slowdown. Looks like no real point in dynamic request marshaling unless it's possible to drop the wrappers from the ABI and go to just inline wrappers in the headers. If doing that the size benefit of dropping all wrappers from the shared lib could be worth the perf cost. But, not ABI compatible obviously. This isn't saying anything about other benefits of providing programmatic access to the protocol descriptions - the point of this patch was just to understand tradeoffs of dynamic request marshaling. Created attachment 38255 [details] [review] benchmark used with previous patch -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/proto/xcbproto/issues/8. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.