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

Go

Name: Anonymous 2012-06-23 6:16

Currently running this bitch on a server with 24 processors clocked at 2.6Ghz, 16GB of ram and fiber connection. Currently pinging about 300-400 IP addresses/second. And the glue holding this bitch together is Go. Look at that simple concurrency model and message passing, it's a thing of fucking beauty. Now to get this running on the other 4 servers just like it.

http://pastebin.com/rqEvpszX
Currently running at: 177 valid IPs/second, 582 IPs/second

And I know that the last part is a little hacky and that the IP functions should be moved to their own source file. Bite me.

Why aren't you using Go /prog/?

Name: Anonymous 2012-06-24 12:36

To use Go efficiently you must,

- avoid struct types which contain both integer and pointer fields

- avoid struct types containing arrays such as [100]byte (replace it with *[100]byte or with []byte)

- avoid data structures which form densely interconnected graphs at run-time

- avoid deep call chains at run-time

- replace pointer identity with value equivalence (this can lead to a more explicit memory management in your program)

- if a data structure contains both long-lived and short-lived fields, move the short-lived fields into a separate data structure or into local variables of a function

- avoid integer values which may alias at run-time to an address; make sure most integer values are fairly low (such as: below 10000)

- if you are using caches to speed up your program, apply the rules mentioned here to redesign the cache. It may also help to use strings instead of structs as map keys.

- lower the overall memory consumption of your program

- carefully speed up your program (this may lead to a lower memory consumption in certain situations)

- call runtime.GC()  (at the right moment)

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