Fandom

Planet JFX

Numeric Types

118pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Numeric Types Edit

In attendance: Joe Darcy, Lubo, Brian, Per, and Robert.

Joe's comments --

  • long to/from double is a major source of conversion headaches
  • float is too low of precision to be useful
  • single numeric type (double) is a nightmare: array indexed by 2.5; isPrime, etc
  • smaller numeric types (short, byte, etc) are not "true" JVM types -- and have little use in the space
  • the combination of double and int is a good choice in the space -- provides good interop with libraries and best performance
  • alternative is double and infinite precision integer
  • infinite precision integer could be achieved with an extra Object field and two xor tests for overflow

Group consensus --

  • double and int used now
  • decision on infinite precision integer can be deferred without architectural impact
  • idea that infinite precision integer could be optionally supported (for small devices) was rejected on WORA grounds


Back to OpenJFX Compiler

Comments Edit

I'd note that if you're accessing an array by index in jfx you're probably avoiding more set-oriented, declarative equivalents to something. It seems to me that it should be substantially easier for a runtime to optimize set notation and functions, versus procedural code.

var numbers = [ 1,4,7,4,3,7,9];
var odds = select n from numbers where n % 2 == 1;

Rossjudson 21:37, 1 March 2008 (UTC)

Also on Fandom

Random Wiki