Re:Some Reflections on Being Turned Down for a Lot of Data S...
by cjhanks on Monday March 06, 2017 @07:10PM
(#13807285)
Functional programming for a lot of numerical computing maps easier to mathematical notation. However, Scala is usually a worse choice than Java for numerical computing since everything is a boxed type.
[ Parent
| on HN ]
Re:Some Reflections on Being Turned Down for a Lot of Data S...
by kod on Tuesday March 07, 2017 @08:35AM
(#13810145)
This is straight up false, why do you think Scala doesn't have primitive values? Long will be either a value or reference type as needed, despite being spelled only one way instead of two different ways in java.
Re:Some Reflections on Being Turned Down for a Lot of Data S...
by cjhanks on Tuesday March 07, 2017 @04:22PM
(#13815026)
A 'primitive type' is one which can be directly operated on by intrinsic CPU instructions. My understanding of Scala was that all objects (such as Long, Int...) are encapsulated inside of an object.
Therefore an array of boxed types will not be memory aligned; and any vector instructions (which are very important to scientific computing) cannot be used.
Perhaps something has changed in Scala land since I last looked(??).
Re:Some Reflections on Being Turned Down for a Lot of Data S...
by premium-concern on Tuesday March 07, 2017 @05:08PM
(#13815515)
No, it has been worked the way GP wrote since approximately forever.