Re: Dealing with higher order operations coupled with primitives

Discussion in 'Java' started by markspace, Jun 22, 2012.

  1. markspace

    markspace Guest

    On 6/22/2012 5:00 AM, rossum wrote:

    > By all means eleminate boxing if you boxing program runs too slowly,
    > but until you have written it, tested it and profiled it to show that
    > boxing is the problem then you have no reason to avoid boxing.



    Just to interject gently here: It seems to me that the OP has stated
    that he did experiment with Objects, and confirmed that the overhead was
    too high for his purposes.
     
    markspace, Jun 22, 2012
    #1
    1. Advertisements

  2. markspace

    Lew Guest

    markspace wrote:
    >rossum wrote:
    >> By all means eleminate boxing if you boxing program runs too slowly,
    >> but until you have written it, tested it and profiled it to show that
    >> boxing is the problem then you have no reason to avoid boxing.

    >
    > Just to interject gently here: It seems to me that the OP has stated
    > that he did experiment with Objects, and confirmed that the overhead was
    > too high for his purposes.


    Just to reply bluntly here, but what the OP stated was,
    "since I do not want to incur the boxing overhead of Objects",
    not that he had measured that overhead or even knew that it was real.

    He's confirmed nothing insofar as he's told us.

    --
    Lew
     
    Lew, Jun 22, 2012
    #2
    1. Advertisements

  3. markspace

    markspace Guest

    On 6/22/2012 12:45 PM, Lew wrote:
    > markspace wrote:
    >> rossum wrote:
    >>> By all means eleminate boxing if you boxing program runs too
    >>> slowly, but until you have written it, tested it and profiled it
    >>> to show that boxing is the problem then you have no reason to
    >>> avoid boxing.

    >>
    >> Just to interject gently here: It seems to me that the OP has
    >> stated that he did experiment with Objects, and confirmed that the
    >> overhead was too high for his purposes.

    >
    > Just to reply bluntly here, but what the OP stated was, "since I do
    > not want to incur the boxing overhead of Objects", not that he had
    > measured that overhead or even knew that it was real.
    >
    > He's confirmed nothing insofar as he's told us.
    >



    About 1/3 of the way through his post he says:

    "Here if there are many parts to arg, I may fun.apply(tmp, arg.get(...))
    many many times. In my benchmarks, this seems to be much slower than
    what I could get without this abstraction. I am trying to reduce this
    overhead as much as possible."

    That and everything below it seems to imply actual prototyping,
    especially later on where me mentions comparing benchmarks between Java
    and C.

    OTOH his code is kind of sloppy. For example, his implementation of his
    recursive sum overflows Java's int and gives the wrong answer. This
    might be a reason why his Java is fast, if other languages are dealing
    with infinite precision and promoting ints to a higher precision format.
     
    markspace, Jun 22, 2012
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonathan Bartlett

    Higher-Order Programming in C

    Jonathan Bartlett, Mar 31, 2005, in forum: C Programming
    Replies:
    4
    Views:
    419
    Jonathan Bartlett
    Apr 4, 2005
  2. Mark Fink
    Replies:
    3
    Views:
    399
    Arnaud Delobelle
    Dec 22, 2010
  3. rolo

    Dealing with primitives

    rolo, May 20, 2004, in forum: Ruby
    Replies:
    3
    Views:
    262
    Jeff Mitchell
    May 20, 2004
  4. Nickolay Kolev

    Higher Order Functions

    Nickolay Kolev, Jul 31, 2005, in forum: Ruby
    Replies:
    5
    Views:
    292
    Nickolay Kolev
    Aug 8, 2005
  5. Victor \Zverok\ Shepelev

    Higher-order messaging in Ruby

    Victor \Zverok\ Shepelev, Oct 11, 2006, in forum: Ruby
    Replies:
    0
    Views:
    208
    Victor \Zverok\ Shepelev
    Oct 11, 2006
  6. Nate Murray
    Replies:
    13
    Views:
    314
    Gregory Brown
    Jan 5, 2007
  7. Christoffer Lernö
    Replies:
    17
    Views:
    373
    Robert Dober
    Mar 16, 2007
  8. Gina Engli
    Replies:
    10
    Views:
    579
    Borg Queen
    Jun 23, 2012
Loading...