Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

WHICH IS FASTER

Name: Anonymous 2008-07-04 8:27

(incf foo) or (+ 1 foo)

Name: Anonymous 2008-07-04 8:47

foo++ or ++foo

Name: Anonymous 2008-07-04 8:52

>>2
The latter.

Name: Anonymous 2008-07-04 8:55

>>1
Those two aren't equivalent.

>>3
If that's used as a statement, there's no difference.
It depends on the compiler and the surrounding code.
But yes, with a naive compiler, the latter is a bit faster

Name: Anonymous 2008-07-04 8:56

>>3
Enjoy your '70s abandonware compiler.

Name: Anonymous 2008-07-04 8:59

>>4
Those two aren't equivalent.
Of course I meant (setf x (+ 1 x)). Duh.

Name: Anonymous 2008-07-04 9:21

foo % 2 or foo & 1

Name: Anonymous 2008-07-04 9:54

>>7
The latter.  (Those two aren't equivalent.)

Name: Anonymous 2008-07-04 10:02

foldl or foldr

Name: Anonymous 2008-07-04 10:05

>>9
foldl'

Name: OP 2008-07-04 10:08

Answer my question.

Name: Anonymous 2008-07-04 10:09

foldr is faster, but doesn't work on infinite lists.
 :(

Name: Anonymous 2008-07-04 10:46

>>12
foldr is faster? Why?

Name: Anonymous 2008-07-04 11:04

>>13
Good question.

Name: Anonymous 2008-07-04 11:28

gcc or ghc

Name: Anonymous 2008-07-04 11:35

>>15
Ruby is by default slow as fuck, so [/aa]gcc[/aa] is faster.

Name: Anonymous 2008-07-04 14:52

>>16
Glasgow Hruby Compiler?

Name: Anonymous 2008-07-04 15:00

>>17
Gay Hipster Compiler

Name: Anonymous 2008-07-04 15:12

>>18
WOW SO FUNNY

Name: Anonymous 2008-07-04 15:15

>>19
It may not be funny, but it's appropriate.

Name: Anonymous 2008-07-04 17:03

(+ 1 foo)

Name: Anonymous 2008-07-04 18:44

>>1,6
Those two mean exactly the same, but as incf is more readable, use that.

>>2
++i:
i = i + 1;
return i

i++:
tmp = i
i = i + 1
return tmp

>>9
foldl: Slow, sucks, etc.
foldl': Strict version of foldl, so it's faster, but it doesn't work on infinite lists.
folrd: Infinite list goodness.

Conclusion: foldl' for finite lists, foldr for infinite.

>>15
gcc for c, ghc for haskell...

Name: Anonymous 2008-07-04 19:14

>>22
%s/\v(++i|i++)/return \1/

do_something_with(++i);
i = i + 1;
do_something_with(i);

do_something_with(++i);
do_something_with(i);
i = i + 1;

Name: >>23 2008-07-04 19:15

do_something_with(i++);
do_something_with(i);
i = i + 1;

Name: Anonymous 2008-07-04 19:22

Someone hasn't read their SIEMQ today.

Name: Anonymous 2008-07-04 19:37

>>25
EMQ expansion required.

Name: Anonymous 2008-07-04 19:43

>>26

EXPERT
MULTILINE
QUOTING

Name: Anonymous 2008-07-04 20:01

>>27
You're pathetic.

Name: Anonymous 2008-07-04 20:03

>>27
Not expert enough, but it's a safe method. There are a few people that realized the other method, but it's not the natural BBCode way to do things. It's kind of sad, because as an EXPERT BBCODE PROGRAMMER I must adapt my mindset and skip abstraction layers.

Name: 27 2008-07-04 20:53

>>29
I've written some of the most beautiful BBCode here (and gotten compliments to that effect); I know all the tricks.  But if I'm just doing multiline, there's no reason not to use that method.

Name: Anonymous 2008-07-04 23:19

[quote]bbcode[/code]

Name: Anonymous 2010-12-17 1:30

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-03 7:13

Name: Sgt.Kabukiman眧微 2012-05-24 10:07

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Name: bampu pantsu 2012-05-29 4:04

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List