Thread View: sci.math
1 messages
1 total messages
Started by Johann 'Myrkraverk' Oskarsson
Wed, 21 Oct 2026 12:21
Re: “The end of software secrecy is almost upon us"
Author: Johann 'Myrkraverk' Oskarsson
Date: Wed, 21 Oct 2026 12:21
Date: Wed, 21 Oct 2026 12:21
42 lines
2846 bytes
2846 bytes
On 10/21/2026 9:30 AM, Lawrence D’Oliveiro wrote:
> On Tue, 20 Oct 2026 17:15:28 -0000 (UTC), Thomas Koenig wrote:
>
>> But the attitude of not caring about speed can have grave results
>> when the inefficiencies pile up.
>
> That’s not usually how code works, though. Execution time tends to
> follow a Pareto distribution -- spend your effort on the 10% of the
> code where 90% of the time is being spent, and that gives significant
> improvements without having to mess around with the other 90% of the
> code.
This is true of code. Yet, you can math yourself to a better solution.
The /obvious/ example everyone here knows is sum of integers, as
int sumint( int a ) {
int value = 0 ;
for ( int i = 1 ; i <= a ; i++ )
value += i ;
return value ;
}
whereas a mathematician might code it as
int sumint( int a ) { return a * ( a + 1 ) / 2 ; }
which is much faster for a large a.
The point I'm making here is that if you myopically focus too much on
the hot code, you might miss an obvious mathematical optimization.
I added sci.math in case the wizards there want to add more obvious ex-
amples I may not be aware of.
Best wishes, and happy optimizations!
--
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads