Skip to content

Numba recursion, ArrayBuilder performance, and writing functions that descend to an an arbitrary list depth #580

Answered by jpivarski
tamasgal asked this question in Q&A
Discussion options

You must be logged in to vote

I struggled with Numba recursion for a while and decided that I don't understand their call-stack restriction. But anyway, you're not going to get the most speed from that because of ArrayBuilder. The absolutely fastest way to do this is to unwrap the array until you're down to just the part that the Numba-compiled function applies to, then wrap the result.

I have an open issue (#516) to make a public interface that would let you write fully general functions like this. Perhaps I should prioritize that. Meanwhile, here's what it would look like, fully written out. The ak.to_layout(x) and x.layout parts extract a layout from an array (the latter only works for ak.Array) and the ak.Array co…

Replies: 12 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tamasgal
Comment options

You must be logged in to vote
2 replies
@jpivarski
Comment options

@tamasgal
Comment options

Comment options

You must be logged in to vote
6 replies
@tamasgal
Comment options

@tamasgal
Comment options

@jpivarski
Comment options

@tamasgal
Comment options

@tamasgal
Comment options

Comment options

You must be logged in to vote
4 replies
@jpivarski
Comment options

@tamasgal
Comment options

@tamasgal
Comment options

@jpivarski
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #580 on December 08, 2020 19:24.