Pages: « 1 2
  Print  
Author Topic: Re: Useful Tips  (Read 23599 times)
Offline (Male) Josh @ Dreamland
Reply #15 Posted on: December 27, 2009, 10:29:48 pm

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
The string pointed to by char* is prefixed with an integer. It's no separate variable; it, in fact, is not referred to by any variable. Much less a private one.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Female) serprex
Reply #16 Posted on: December 28, 2009, 06:50:14 am
Smooth ER
Developer
Joined: Apr 2008
Posts: 106

View Profile WWW
STL mandates that even linked list have O(1) size functions. And as for function call overhead, it's called inlining

Trust your compiler's optimizations, or get staked and use assembly

Like that loop tip. If you're using a tracing JIT, loops are what they feed on. If you're using C, they've already thought about it. Also note code cache might make a loop faster than an unrolled one

As for Josh's talk of std::string, ignore him. Spec doesn't define implementation, hence
« Last Edit: December 28, 2009, 07:15:06 am by serprex » Logged
Post made December 28, 2009, 10:49:25 am was deleted at the author's request.
Offline (Female) serprex
Reply #18 Posted on: December 28, 2009, 12:01:36 pm
Smooth ER
Developer
Joined: Apr 2008
Posts: 106

View Profile WWW
D and C# allow for both integers and strings to be used in switch statements, relying on the compiler to choose a suitable form of jump table (Probably hash jump table, as in the case of sparse integers). Functional languages have pattern matching to cover the syntactic terseness of a switch, and due to an abundance in the semantic qualitiy of referential transparency, optimizations can be applied to output assembly resembling a switch

#3, why are you explaining types? The only languages I've come across that lack multiple primitive types are esoteric languages, and I don't think any of these suggestions would really suit Thue

I disagree with delta timing. You suggest a naive approach which can cause wall jumping in extreme cases. Just program efficiently in the first place, and all is well

Pseudocode is a joke. If I want simple syntax and clear semantics, I'll use Python. If you want to do the whole writing out algorithms without dealing with language hassles, draw out some graphs. Pseudocode doesn't offer enough useful abstraction to call for leaving away testing at a click of a button

#8 is a whole lot of nothing about something
« Last Edit: December 28, 2009, 12:16:45 pm by serprex » Logged
Post made December 28, 2009, 08:09:38 pm was deleted at the author's request.
Post made January 21, 2010, 05:59:33 pm was deleted at the author's request.
Post made January 22, 2010, 09:11:30 pm was deleted at the author's request.
Offline (Unknown gender) luiscubal
Reply #22 Posted on: January 23, 2010, 11:14:09 am
Member
Joined: Jun 2009
Posts: 452

View Profile Email
Does ENIGMA actually support Animated PNG?
Logged
Post made January 23, 2010, 01:14:06 pm was deleted at the author's request.
Offline (Male) Rusky
Reply #24 Posted on: January 23, 2010, 03:26:37 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Get ready to do some slapping.
Logged
Offline (Unknown gender) score_under
Reply #25 Posted on: January 23, 2010, 05:49:09 pm

Member
Joined: Aug 2008
Posts: 308

View Profile
* score_under slaps Fede-lasse
Logged
Offline (Male) RetroX
Reply #26 Posted on: January 27, 2010, 08:34:03 pm

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Click here to pronowns something in Ing-lish
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Post made January 28, 2010, 10:24:57 am was deleted at the author's request.
Pages: « 1 2
  Print