[babl] extensions/fast-float: reduce precision
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] extensions/fast-float: reduce precision
- Date: Sun, 1 Apr 2012 14:04:28 +0000 (UTC)
commit 9964f870b1e9599ccd6091c3869ad14ca030ff98
Author: Ãyvind KolÃs <pippin gimp org>
Date: Sun Apr 1 15:03:10 2012 +0100
extensions/fast-float: reduce precision
Reduce sizes of lookup tables by an order of magnitude, doubling the run-time
performance.
extensions/fast-float.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/extensions/fast-float.c b/extensions/fast-float.c
index 2d02931..77ca633 100644
--- a/extensions/fast-float.c
+++ b/extensions/fast-float.c
@@ -199,6 +199,11 @@ babl_lookup_new (BablLookupFunction function,
((positive_max-positive_min)+
(negative_max-negative_min)), 1);
+ printf ("%i\n",
+ sizeof (BablLookup) + sizeof (float) *
+ ((positive_max-positive_min)+
+ (negative_max-negative_min)));
+
lookup->positive_min = positive_min;
lookup->positive_max = positive_max;
lookup->negative_min = negative_min;
@@ -438,8 +443,8 @@ init (void)
float f;
float a;
- fast_pow = babl_lookup_new (core_lookup, NULL, 0.0, 1.0, 0.00001);
- fast_rpow = babl_lookup_new (core_rlookup, NULL, 0.0, 1.0, 0.00001);
+ fast_pow = babl_lookup_new (core_lookup, NULL, 0.0, 1.0, 0.0001);
+ fast_rpow = babl_lookup_new (core_rlookup, NULL, 0.0, 1.0, 0.0001);
for (f = 0.0; f < 1.0; f+= 0.000001)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]