Comments (5)
Hi, https://github.com/MikeLankamp/fpm/blob/master/docs/performance.md (linked from the README) should contain what you need.
Code using FPM may be vectorizable depending on its use and the compiler; I can't make blanket statement.
Does this answer your questions?
from fpm.
@NikitaMishin As mentioned in issue #5, this library already supports fixed<48, 16>. I can confirm as just started using fixed<32, 32> today
On topic: I'd also like +1 for benchmarks using larger type size. In fact, I'd love a benchmark for fixed<std::int64_t, boost::multiprecision::int128_t, 32>
specifically, but that's because that's exactly what I'm using and won't be benchmarking myself for a long time coming =)
from fpm.
Yep, just looking for an fixed <48,16> or fixed<32,16> and its performance. But I am not sure if the library supports this. Is it supported? I saw the closed issue but this is unclear whether or not it is supported now.
from fpm.
@MikeLankamp this one #5 (is this issue with the support of fixed<48,16> is abandoned?)
from fpm.
In case anyone is looking for some quick numbers, I did a quick test comparing standard fixed_16_16 vs fixed<48, 16> with int64_t and boost's int128_t in the context of my (very early phase) game.
- Context:
- What's being used: Using my game library/simulation layer which primarily consists of a custom, not-optimized physics engine with some ECS and simple physics-based gameplay. This "sim layer" library is then used on top of vanilla UE4, with the goal being to achieve full determinism
- Metric: How long does a single sim library frame update take to process
- Method: Just logging metric, playing for a few seconds, then scrolling through all the numbers. All numbers below are just a quick and rough estimate
- Data
"Float" type | Range for frame update time | Est. mean |
---|---|---|
pre-fpm raw floats | ~80-400us | ~150us |
fixed_16_16 | ~400-750us | ~500us |
fixed<48, 16> w/ boost | ~4-7ms | ~5ms |
That's about a 10x increase in time per frame update from switching to fixed<std::int64_t, boost::multiprecision::int128_t, 32>
in my specific case... which is way too slow for my needs
Edit:
Tested fpm::fixed<std::int64_t, std::int64_t, 16>
and it has about the same performance as fixed_16_16 in my context
from fpm.
Related Issues (20)
- Conversion of max() and lowest() to float HOT 6
- Question about having to resort to floats for initialization. HOT 1
- Provide a way to serialize fpm::fixed HOT 2
- How to convert from fixed to float or int? HOT 1
- Avoid using floating point arithmetic to compute static_cast<double>(fpm::fixed_16_16) HOT 6
- Unable to compile when minwindef.h is (implicitly) included before fixed.hpp HOT 2
- Support for Shift Operators HOT 5
- std::numeric_limits<>::has_denorm shall be of type float_denorm_style, not bool
- Please allow to use the external libfixmath HOT 3
- Feature Proposal: optionally disable rounding HOT 3
- Support fraction-only unsigned numbers
- Cannot result in a constant expression errors HOT 1
- Is there a way to initialize a fpm value from the string expression of a float number? HOT 3
- std::numeric_limits<fp>::min() vs. lowest() HOT 2
- Use types larger than 32bit HOT 5
- Include a link in your docs to this GitHub HOT 1
- [feature request] include a sin() that accept degrees instead of radians HOT 3
- Docs bug? Signed vs Unsigned integer types HOT 1
- Docs: mention rounding mode(s)?
- Is Division of two fixed point numbers implemented? HOT 3
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 fpm.