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

Pages: 1-

Python speed

Name: Anonymous 2009-01-03 8:38

http://bugs.python.org/issue4753
What does ~100ms means? how much loops is this?

Name: Anonymous 2009-01-03 9:03

its means like 4093xz
that like being 1 loops

Name: Anonymous 2009-01-03 9:07

in 100ms even javascript can make 100000 function calls.
Assembly is roughly x100 faster.

Name: Athlon 4000+ 2009-01-03 9:16

function tmp444(){    var d = new Date;
    var std = d.getTime();

for(var i=100000;i>0;i--){
    var res = Math.log(i);}
    var d2 = new Date;
    var std2 = d2.getTime();
    var diff = std2 - std;
    return diff}

94 milliseconds

Name: Intel Core 2 Duo 2.16GHz 2009-01-03 9:55

>>4
35 milliseconds

Name: Athlon 4000+ 2009-01-03 10:03

I will try it in new Firefox3.2 nightly build after it downloads.
brb

Name: Athlon 4000+ 2009-01-03 10:36

658ms (in x100 more loops)=6.58ms
3.2prealpha is 14 times faster(JIT)!

the code:
function tmp444(){    var d = new Date;
    var std = d.getTime();

for(var i=10000000;i>0;i--){
    var res = Math.log(i);}
    var d2 = new Date;
    var std2 = d2.getTime();
    var diff = std2 - std;
    return diff}

Name: Anonymous 2009-01-03 11:15

How fast would this run in C++ or assembly?

Name: Anonymous 2009-01-03 11:29

>>8
assuming a function call takes 20 CPU cycles
and CPU executes 3billion of ins. per seconds
3e9/20=150000000 loops/S=150000 loops per ms
this is 987000 loops per 6.58ms
>>7 is 100000 loops per 6.58ms
9.87 times faster

Name: Anonymous 2009-01-03 11:45

>>7
Are the 3.2 nightlies worth using? I am intrigued by this JIT compilation and would like to try it without getting assraped by alpha-quality software.

Name: Anonymous 2009-01-03 11:49

>>10
according to forums:Addons sometimes crash or not work.
but Firefox 2 crashes every week by itself.
Right now nothing crashed, just few extensions don't work(using nightly tester tools).

Name: Anonymous 2009-01-03 13:38

there is however a maddenign thign which closes tabs if you drag them even 1 mm.

Name: Anonymous 2009-01-03 14:05

>>12
DO THEY SPEAK ENGLISH IN WHAT?

Name: Anonymous 2009-01-03 14:15

>>13
only in hex

Name: Anonymous 2009-01-03 14:33

a = Time.now

10000000.downto(1) do |i|
  Math.log(i)
end

b = Time.now

puts (b - a)


16.385551 seconds

Name: Anonymous 2009-01-03 14:35

>>15
what language is this?

Name: Anonymous 2009-01-03 14:39

>>16
The Slow as Fuck Language Ruby.

Name: Anonymous 2009-01-03 14:48

>>17
The speed is near javascript in Firefox 2
16385/100=
163ms for 100000 loops Ruby
   95ms for 100000 loops firefox 2
   6.58 ms firefox 3

Name: Anonymous 2009-01-03 16:00

Ruby 2.0 will get it down to 0.0ms because YARV was developed by a Japanese.

Name: Anonymous 2009-01-03 23:13

>>9
Or... the results of the function may be cached as getTime in this case doesn't really have any side-effect on the world outside of function.

Name: Anonymous 2009-01-03 23:18

Name: Anonymous 2009-01-04 0:42

>>21
lol @ buggy gnu shit

Name: Anonymous 2009-01-04 6:47

>>21
anonix ed is superior.

in related news, /prog/ has been so boring lately that i actually contributed some code to anonix: http://rechan.eu.org/ac/res/1231054663259.htm

Name: Anonymous 2009-01-04 7:57

>>23
char s[LINE_MAX];
I'm afraid that won't work.

Name: Anonymous 2009-01-04 8:00

>>24
it should work: http://opengroup.org/susv3xsh/fgets.html#tag_03_164_06_01

unless you're claiming the example there is broken...

Name: Anonymous 2009-01-04 8:07

>>25
The following sections are informative.

Also, from http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html

Implementations may choose any appropriate value for each limit, provided it is not more restrictive than the Minimum Acceptable Values
Applications should not assume any particular value for a limit.

In Anonix, many of the values in limits.h will be  INT_MAX or UINT_MAX. Everything that can vary in size will be dynamically allocated up to available memory or the ulimit for the process, whichever is smaller.

Name: Anonymous 2009-01-04 9:09

>>24,26
that's easy to fix anyway:
int print_date(char *fmt, int u){
  size_t size = 1024;
  int ret;
  char *t, *s = malloc(size);
  time_t t = time(NULL);
  struct tm *ts = (u ? gmtime : localtime)(&t);
  if(!ts) return EXIT_FAILURE;
  while(!strftime(t = s, size, fmt, ts))
    if(size > SIZE_MAX / 2 || !(s = realloc(t, size *= 2))){
      free(t);
      return EXIT_FAILURE;
    }
  ret = puts(s) > -1 ? EXIT_SUCCESS : EXIT_FAILURE;
  free(s);
  return ret;
}

Name: Trollbot9000 2009-07-01 10:45


5 4 2 0 kind of way  for hackers to  prove their identity  or are they  trolling or what  seemed like eternity.

Name: Anonymous 2010-11-14 5:24

Name: Anonymous 2011-01-31 20:10

<-- check em dubz

Name: Anonymous 2011-02-04 18:12

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