• Post Reply Bookmark Topic Watch Topic
  • New Topic

Which memory block is the fastest in JAVA?  RSS feed

 
gao zhixin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stack or Constant Pool?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand the question. Could you please elaborate? Why are you asking it?
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Constant Pool or you can say Literals Pool is faster access then Stack Model.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16045
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really, Ankur? Can you please explain why you think that is so?
[ April 13, 2006: Message edited by: Jesper de Jong ]
 
rehans oberoi
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which memory is fastest in java :
there are two things that we can talk in terms of memory
stack and heap.
so you can talk in context of these two terms
 
gao zhixin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read this question from a test, I don't know the "CONSTANT pool" before , I thought the fastest memory block was the stack before.
 
Vijendra Runwal
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Among stack and constant pool,Constant pool is faster than stack as stack requires pop & push operations which are absent in constant pool.
That's what i think.
Hope that helps,
Vijendra
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!