hai frnz i have just started my android developer training..i came across a term called 'register based'..can anyone tell what is register based..and pls explain the difference between stack based and register based
On Sun, Oct 28, 2012 at 5:46 AM, krithika rajan <itsme.kree...@gmail.com>wrote:
> hai frnz i have just started my android developer training..
I would suggest your put your Android developer training on hold and do so
English training.
> i came across a term called 'register based'..can anyone tell what is
> register based..and pls explain the difference between stack based and
> register based
There's this amazing technology called "search" that lets you input terms
to a website and, using *magic*, it gives you answers. Give it a shot.
--------------------------------------------------------------------------- ----------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices
krithika rajan wrote: > hai frnz i have just started my android developer training..i came across > a term called 'register based'..can anyone tell what is register based..and > pls explain the difference between
What is "fmz"? What is "pls"?
> stack based and register based
This is fundamental, basic, introductory, beginning-level computer terminology.
"Stack" is a region of memory pointed to by the "stack pointer", and bounded in size to be smaller than all of memory. It is distinct from "heap", a bunch of the rest of memory, in how it is found and accessed. Each subregion of stack holds a group of data related to the execution state for a particular method or segment of code, that method or code segment-worth of data being known as the "context" for that method or segment.
A "register" is a word, or doubleword or quadword of very, very, very fast storage on the CPU used to hold a single value (data or instruction).
"Stack-based" means that arguments are passed (e.g., to methods) on the stack, i.e., pushed onto the top of the function-local memory, along with whatever other state is needed for that function.
Upon return (e.g., from the method) the stack pointer resets to where it was before the call, effectively erasing all knowledge of the portion of stack that was local to the method (or code segment). It is that push-on, pull-off action that makes that memory region a stack.
A stack is a fundamental, basic, introductory data structure.
"Register-based" means that data is passed directly in a register, not in memory such as stack. Generally there are not many registers available so only key data are passed through registers, the rest being kept in the context on the stack.
Register-based access tends to be faster than stack-based if the right values are passed via registers.
hahaha this guy treking is damn funny instead of giving lecture if he
provide some sufficient information related to query what wrong in that. i
think he is always remain out of his mind and always irriate everyone
On Mon, Oct 29, 2012 at 4:52 PM, Lew <lewbl...@gmail.com> wrote:
> krithika rajan wrote:
>> hai frnz i have just started my android developer training..i came across
>> a term called 'register based'..can anyone tell what is register based..and
>> pls explain the difference between
> What is "fmz"? What is "pls"?
>> stack based and register based
> This is fundamental, basic, introductory, beginning-level computer
> terminology.
> "Stack" is a region of memory pointed to by the "stack pointer", and bounded
> in size to be
> smaller than all of memory. It is distinct from "heap", a bunch of the rest
> of memory, in
> how it is found and accessed. Each subregion of stack holds a group of data
> related to
> the execution state for a particular method or segment of code, that method
> or code
> segment-worth of data being known as the "context" for that method or
> segment.
> A "register" is a word, or doubleword or quadword of very, very, very fast
> storage on the CPU
> used to hold a single value (data or instruction).
> "Stack-based" means that arguments are passed (e.g., to methods) on the
> stack, i.e., pushed onto
> the top of the function-local memory, along with whatever other state is
> needed for that function.
> Upon return (e.g., from the method) the stack pointer resets to where it was
> before the call,
> effectively erasing all knowledge of the portion of stack that was local to
> the method (or code
> segment). It is that push-on, pull-off action that makes that memory region
> a stack.
> A stack is a fundamental, basic, introductory data structure.
> "Register-based" means that data is passed directly in a register, not in
> memory such as stack.
> Generally there are not many registers available so only key data are passed
> through registers,
> the rest being kept in the context on the stack.
> Register-based access tends to be faster than stack-based if the right
> values are passed via
> registers.
Lew is correct,
But as far as actual VMs go, the differences are more cosmetic than
anything these days, as Dalvik's JIT will change things somewhat.
Furthermore, even when you're running under the interpreter, the
'register based' mapping in Dalvik is really only ever an offset from
the beginning of a stack frame anyway.
As an Android programmer you don't really need to worry about this at
all, you will never see it, it's all handled by the Android toolchain
(which takes a class based Java file and transforms it into a register
based Dalvik file).
(If you're writing a compiler, a stack based VM is dead simple to
generate code for.., a register based VM is not much more work, but
usually you do some static analysis and optimization to correctly
place registers which are in use at the same time..)