You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Paul Taylor (Jira)" <ji...@apache.org> on 2021/02/05 05:34:00 UTC

[jira] [Commented] (ARROW-11347) [JavaScript] Consider Objects instead of Maps

    [ https://issues.apache.org/jira/browse/ARROW-11347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17279348#comment-17279348 ] 

Paul Taylor commented on ARROW-11347:
-------------------------------------

[~domoritz] see my comment here: https://issues.apache.org/jira/browse/ARROW-11351?focusedCommentId=17279344&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17279344

tl;dr; the Row API doesn't use JS's Map, the abstract Row<T> base class just implements the Map<T> interface. The actual lookup is delegated to its concrete subclass implementations StructRow and MapRow. StructRow still uses the flyweight, and MapRow attempts a similar optimization via Proxies if available.

> [JavaScript] Consider Objects instead of Maps
> ---------------------------------------------
>
>                 Key: ARROW-11347
>                 URL: https://issues.apache.org/jira/browse/ARROW-11347
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: JavaScript
>            Reporter: Dominik Moritz
>            Priority: Major
>              Labels: performance
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> A quick experiment (https://observablehq.com/@domoritz/performance-of-maps-vs-objects) seems to show that object accesses are a lot faster than map accesses. Would it make sense to switch to objects in the row API to improve performance? 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)