Everything2
Near Matches
Ignore Exact
Full Text
Everything2

CSE

created by jlcooke

(idea) by call (1.5 d) (print)   ?   (I like it!) Thu May 17 2001 at 7:54:06

Also Common Subexpression Elimination. A frequently-used technique in compilers. Where a subexpression appears more than once in an expression (or in a wider range, if the compiler is smart enough), and can be proven to have the same value on each evaluation, the value of the subexpression can be calculated only once, and reused. Example:
max = (((a-b) >> 31) & b) + (a-b);
The 'a-b' term appears twice, so naively compiles to:
sub t1, a, b
shr t1, t1, #31
and t1, t1, b
add t1, t1, b
sub t1, t1, a
But by using CSE on the expression, we can rewrite the code as
register int t2 = (a-b);
max = (t2>>31) & b + t2;
which, similarly naively, compiles to
sub t2, a, b
shr t1, t1, #31
and t1, t1, b
add t1, t1, t2

Code and execution time saving is proportional to the complexity of the subexpression and the number of times it appears, minus one; in the above case, a single instruction.

In general, CSE decreases code size but increases register pressure. If many simple expressions are reused only once, it's often quicker to calculate the expression each use rather than save and restore the registers.


(thing) by johndoh (2 y) (print)   ?   (I like it!) Sun Apr 07 2002 at 15:41:06

An often used acronym for Computer Science and Engineering. A program that is offered in different forms at different universities. At the University of Connecticut it is just short of a double major in the two subjects. A good, all around engineering degree which at UConn is by far the most popular major to choose for incomming freshmen and the most often left after their first semester.

printable version
chaos

Communications Security Establishment Limited-range MAX without branches I love my job CSIS
Computer Engineering is not the same as Computer Science CSI University of Connecticut Intelligence Services
God Damn You, Professor Mysterious! The Art of the Mix Tape Fisherman's knot Cite
Unicode Middle Eastern Scripts Ugol's Law Demonyms of Australia Jefferson Hall
engineering HVAC science vs. engineering proved
complexity Proportional Rewrite The Contrabulous Fabtraption of Professor Horatio Hufnagel
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
The best nodes of all time:
Summer storm
Che Guevara
monster truck
The Myth of the Liberal Media
4'33"
The waterhammer
Good Friday
Stained Glass Primer
Restricting Childbirth
Persephone
Wannsee Conference
How to make a car last nearly forever
If I were watched alone, I'd be considered insane
New Writeups
antigravpussy
One fly amongst many(person)
sam512
Moon Base Shackleton, 1978(fiction)
Pavlovna
toy boy(person)
XWiz
tear jerker(review)
Heitah
Anarchy is Order(idea)
jessicaj
July 26, 2008(dream)
Berek
ABBA(person)
devolution
k-hole(place)
Nadine_2
The Sound Of Madness(review)
SwimmingMonkey
Conversations with Fo Fo, the Loneliest dog in Purgatory(fiction)
locke baron
lynx(thing)
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
This page courtesy of The Everything Development Company