展示HN:Xpandas – 直接在纯C++中运行Pandas风格的计算
嗨,HN,
我一直在探索是否可以将pandas用作计算描述,而不是运行时。
这个想法是用pandas/NumPy编写数据逻辑,然后将该逻辑冻结为一个静态计算图,并在纯C++中执行,而不嵌入Python。
这并不是要重新实现pandas或加速Python,而是在pandas风格的逻辑有用的情况下,Python本身变成了一个负担(延迟、嵌入、部署)。
这个项目仍然很小且处于实验阶段,但它已经可以处理一小部分类似pandas的操作,并且在C++中以确定性方式运行。
代码库: [https://github.com/CVPaul/xpandas](https://github.com/CVPaul/xpandas)
我很想听听大家对这个方向是否合理的反馈,以及大家认为可能出现问题的地方。
查看原文
Hi HN,<p>I’ve been exploring whether pandas can be used as a computation description, rather than a runtime.<p>The idea is to write data logic in pandas / NumPy, then freeze that logic into a static compute graph and execute it in pure C++, without embedding Python.<p>This is not about reimplementing pandas or speeding up Python.
It’s about situations where pandas-style logic is useful, but Python itself becomes a liability (latency, embedding, deployment).<p>The project is still small and experimental, but it already works for a restricted subset of pandas-like operations and runs deterministically in C++.<p>Repo: <a href="https://github.com/CVPaul/xpandas" rel="nofollow">https://github.com/CVPaul/xpandas</a><p>I’d love feedback on whether this direction makes sense, and where people think it would break down.