Comments (9)
If you want to run benchmarks to check this claim of bad heap performance, be careful to do it correctly. On Linux, allocating an array of PODs with new will be "very fast", because the OS does not actually do anything yet. The actual allocation only happens when you write to this memory.
from boost-histogram.
Adding boost::optional adds a dependency, and this is something that should not happen "often", so paying a small cost should be okay. But it should be looked into.
from boost-histogram.
It will hurt in timeit benchmarks of the fill performance in Python. fast-histogram is 25x faster than numpy for small arrays because it doesn't allocate a second array for the bin edges.
from boost-histogram.
Some allocations were removed, but there are more to go.
from boost-histogram.
Keep in mind that making Python objects makes small allocations too, and also pays a little extra cost as well in Python bookkeeping.
from boost-histogram.
Immediately reading everything into C++ structures, then working on those (possibly without the GIL) would probably be the fastest way to work. (Thinking of Python arguments here, but could be applied to other places with small allocations possibly) I'm not against adding boost::optional
if it helps the design, as well. At the moment I'll be focusing on things needed for 0.5, feel free to work on it though!
from boost-histogram.
Keep in mind that making Python objects makes small allocations too, and also pays a little extra cost as well in Python bookkeeping.
Creating new Python objects, yes. I avoid creating new Python objects. Creating a py::None costs nothing, since there is only one allocated instance of None in a Python program anyway.
from boost-histogram.
Immediately reading everything into C++ structures, then working on those (possibly without the GIL) would probably be the fastest way to work.
I don't believe this is true and you would sacrifice single-thread performance.
from boost-histogram.
I think this can be closed. I haven't noticed anything lately.
from boost-histogram.
Related Issues (20)
- [BUG] (Discussion) Input validation/preprocessing in AxesTuple HOT 7
- [BUG]: Scaling a weighted histogram does not appropriately scale the variance HOT 6
- [FEAT] Add operators (mult/div/sub) for (weighted) histograms/accumulators HOT 6
- [BUG] np.cumsum fails on views with non-default storage type
- [BUG] Failure to conver awkward Masked array to numpy HOT 3
- [BUG] Indexing along two axes with list and single index raises RuntimeError
- [DOCS] add documentation for Nox
- [DOCS] change all the code directives to code-block
- [BUG] Investigate providing a better error message if sample= is missing
- [FEAT] Scaling a slice of a histogram
- [BUG] Cannot get index of huge numbers in IntCategory HOT 1
- [BUG] Issues with copying in child classes of weighted Histogram
- [FEAT] in multidimensional histograms allow the binning to vary along an axis
- Inconsistent filling of values on bin edges [BUG] HOT 1
- [FEAT]: Add -latomic link arg for armv7l machines HOT 3
- Pickling a histogram creates an extra copy of the array in memory HOT 1
- [BUG] Filling Integer Axis with doubles is buggy
- Version 1.4.0 and roadmap
- *Category axes do not support disabling overflow
- [BUG] Filling with unsigned ints in IntCategory axis raises TypeError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boost-histogram.