# optimisation

Published articles for optimisation.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Optimistic Provide: How We Made IPFS Content Publishing 10x Faster

DevFeed: [Optimistic Provide: How We Made IPFS Content Publishing 10x Faster](<https://devfeed.tech/articles/optimistic-provide-how-we-made-ipfs-content-publishing-10x-faster-35630.md>)

Original publisher: [Read original article](<https://blog.ipfs.tech/2026-05-optimistic-provide/>)

Author: Dennis Trautwein

Published: 2026-05-16T00:00:00Z

Content type: article

Language: en

Sources: [IPFS](<https://devfeed.tech/sources/ipfs.md>)

Topics: [IPFS](<https://devfeed.tech/topics/ipfs.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [networking](<https://devfeed.tech/topics/networking.md>)

Tags: [ipfs](<https://devfeed.tech/tags/ipfs.md>), [kubo](<https://devfeed.tech/tags/kubo.md>), [latency](<https://devfeed.tech/tags/latency.md>), [networking](<https://devfeed.tech/tags/networking.md>), [object-object](<https://devfeed.tech/tags/object-object.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [performance](<https://devfeed.tech/tags/performance.md>), [publishing](<https://devfeed.tech/tags/publishing.md>)

### AI overview

The article explains Optimistic Provide, an optimization for publishing content through IPFS's Amino DHT. It describes how the technique reduces upload latency from more than 13 seconds to less than one second while reducing network overhead by 40%, and notes that it shipped by default in Kubo 0.39.0.

### Source excerpt

How a statistical approach cut IPFS content publishing times by over one order of magnitude.

## SQLite Query Optimisation - How the Planner Thinks and Where It Goes Wrong

DevFeed: [SQLite Query Optimisation - How the Planner Thinks and Where It Goes Wrong](<https://devfeed.tech/articles/sqlite-query-optimisation-how-the-planner-thinks-and-where-it-goes-wrong-39650.md>)

Original publisher: [Read original article](<https://www.gauravsarma.com/posts/2026-03-08_sqlite-query-optimisation>)

Published: 2026-03-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Gaurav Sarma's Blog](<https://devfeed.tech/sources/gaurav-sarma-s-blog.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [b-tree](<https://devfeed.tech/tags/b-tree.md>), [index](<https://devfeed.tech/tags/index.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [planner](<https://devfeed.tech/tags/planner.md>), [query](<https://devfeed.tech/tags/query.md>), [query-planner](<https://devfeed.tech/tags/query-planner.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

### AI overview

A tutorial on how SQLite's query planner chooses between index searches and full table scans. It explains planner behavior, the effects of query patterns and data distribution, and how to avoid conditions that make indexes inaccessible or scans appear cheaper.

### Source excerpt

. [SQLite Query Optimisation](sqlite-query-optimisation-cover...

## How did we build 3D animations in mobile apps?

DevFeed: [How did we build 3D animations in mobile apps?](<https://devfeed.tech/articles/how-did-we-build-3d-animations-in-mobile-apps-15453.md>)

Original publisher: [Read original article](<https://medium.com/wise-engineering/how-did-we-build-3d-animations-in-mobile-apps-515c3de87b74?source=rss----f2565bbe9c46---4>)

Author: Yağız Gürgül

Published: 2025-01-29T16:59:35Z

Content type: tutorial

Language: en

Sources: [Wise Engineering - Medium](<https://devfeed.tech/sources/wise-engineering-medium.md>)

Topics: [Three.js](<https://devfeed.tech/topics/threejs.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [WebGL](<https://devfeed.tech/topics/webgl.md>), [HTML](<https://devfeed.tech/topics/html.md>)

Tags: [3d](<https://devfeed.tech/tags/3d.md>), [animation](<https://devfeed.tech/tags/animation.md>), [gltf](<https://devfeed.tech/tags/gltf.md>), [html](<https://devfeed.tech/tags/html.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [three-js](<https://devfeed.tech/tags/three-js.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

Wise describes how it brought its 3D illustrations to life as interactive real-time animations in mobile apps. The team chose three.js scenes rendered in local HTML files inside mobile app web views, using WebGL for both iOS and Android, and then optimized large glTF assets for mobile delivery.

### Source excerpt

In March 2023, Wise launched its new brand -- as part of it, we introduced a collection of bold new 3D illustrations. While visually stunning, our brand team had bigger ambitions to bring them to life and elevate Wise further. This took us on a journey to understand the technical landscape and challenges around creating a seamless multi-platform solution for interactive 3D animations. interactive 3D intro on Wise iOS appThe new illustration set in Wise Our new illustration set took inspiration from icons, allowing us to communicate with a global audience. They're unique, bold and dynamic, even when still. They give us opportunities to share moments of delight with our customers and help our brand stand out from billboard to button. check out https://wise.design/ for more! What sets illustrations at Wise apart is that they're not static. Each one is paired with a crafted 3D model, featuring detailed UV maps, precise shading, and carefully designed lighting. This raises an exciting question: What if we rendered these illustrations dynamically in real time, making them interactive on mobile apps? Native or web view? To render illustrations in real time, we explored several technical solutions: Native Filament three.js We opted to create 3D scenes using three.js, one of the most popular open-source web projects. Some of the reasons behind this include: Managing native solutions for iOS and Android platforms would demand extra engineering effort. The support and documentation available for three.js surpass others. The web view solution delivers native-like performance by using WebGL on both platforms. As a result, we consistently achieve 60/120 FPS across all scenes on both devices. The plan was simple. Build simple HTML files that render 3D scenes and load these files locally in mobile apps 🚀 But we had a "huge" problem... The 3D models were specifically designed for static illustrations, resulting in a high polygon count that contributes to larger file sizes. For instance

## How to automatically add WebP post banners to Jekyll for faster load times

DevFeed: [How to automatically add WebP post banners to Jekyll for faster load times](<https://devfeed.tech/articles/how-to-automatically-add-webp-post-banners-to-jekyll-for-faster-load-times-38568.md>)

Original publisher: [Read original article](<https://blog.jakelee.co.uk/adding-automated-webp-banners-to-jekyll/>)

Author: Jake Lee

Published: 2024-11-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jake Lee's Programming Blog](<https://devfeed.tech/sources/jake-lee-s-programming-blog.md>)

Topics: [Jekyll](<https://devfeed.tech/topics/jekyll.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Accessibility](<https://devfeed.tech/topics/accessibility.md>), [browsers](<https://devfeed.tech/topics/browsers.md>), [CSS](<https://devfeed.tech/topics/css.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [images](<https://devfeed.tech/tags/images.md>), [jekyll](<https://devfeed.tech/tags/jekyll.md>), [liquid](<https://devfeed.tech/tags/liquid.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [times](<https://devfeed.tech/tags/times.md>)

### AI overview

A tutorial on automating WebP banner generation and delivery in Jekyll. It explains configuring a conversion library, generating WebP files, serving them conditionally with Liquid and picture/source elements, and providing alternative text. The article also notes possible color-rendering issues with the converter.

### Source excerpt

Most modern browsers can handle the smaller & speedier WebP versions of images, yet generating them manually can be a pain! Here's how to do it automatically in Jekyll.

## A Hidden Benefit of Implicit Joins: Join Elimination

DevFeed: [A Hidden Benefit of Implicit Joins: Join Elimination](<https://devfeed.tech/articles/a-hidden-benefit-of-implicit-joins-join-elimination-28930.md>)

Original publisher: [Read original article](<https://blog.jooq.org/a-hidden-benefit-of-implicit-joins-join-elimination/>)

Author: lukaseder

Published: 2024-01-10T14:19:00Z

Content type: article

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>)

Tags: [implicit-joins](<https://devfeed.tech/tags/implicit-joins.md>), [implicit-path-join](<https://devfeed.tech/tags/implicit-path-join.md>), [java](<https://devfeed.tech/tags/java.md>), [join-elimination](<https://devfeed.tech/tags/join-elimination.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-3-19](<https://devfeed.tech/tags/jooq-3-19.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [many-to-many-joins](<https://devfeed.tech/tags/many-to-many-joins.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [path-joins](<https://devfeed.tech/tags/path-joins.md>), [sql](<https://devfeed.tech/tags/sql.md>), [to-many-joins](<https://devfeed.tech/tags/to-many-joins.md>)

### AI overview

This article explains how jOOQ 3.19 can eliminate unnecessary tables from implicit path joins when no columns from those tables are referenced. Primary and foreign keys preserve equivalence, while referenced columns cause the table to remain in the join tree. The behavior applies to implicit path joins and depends on a flag that is disabled by default.

### Source excerpt

One of jOOQ's key features so far has always been to render pretty much exactly the SQL that users expect, without any surprises - unless some emulation is required to make a query work, of course. This means that while join elimination is a powerful feature of many RDBMS, it isn't part of jOOQ's feature ... Continue reading A Hidden Benefit of Implicit Joins: Join Elimination ->

## jOOQ DAOs, CRUD Access, and the N+1 Query Problem

DevFeed: [jOOQ DAOs, CRUD Access, and the N+1 Query Problem](<https://devfeed.tech/articles/to-dao-or-not-to-dao-28968.md>)

Original publisher: [Read original article](<https://blog.jooq.org/to-dao-or-not-to-dao/>)

Author: lukaseder

Published: 2023-12-06T13:41:52Z

Content type: opinion

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [CRUD](<https://devfeed.tech/topics/crud.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Domain-driven design (DDD)](<https://devfeed.tech/topics/domain-driven-design.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [account](<https://devfeed.tech/topics/account.md>)

Tags: [account](<https://devfeed.tech/tags/account.md>), [api](<https://devfeed.tech/tags/api.md>), [crud](<https://devfeed.tech/tags/crud.md>), [dao](<https://devfeed.tech/tags/dao.md>), [data](<https://devfeed.tech/tags/data.md>), [ddd](<https://devfeed.tech/tags/ddd.md>), [developers](<https://devfeed.tech/tags/developers.md>), [join](<https://devfeed.tech/tags/join.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [repository](<https://devfeed.tech/tags/repository.md>), [sql](<https://devfeed.tech/tags/sql.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

This opinion article examines jOOQ's DAO API and the tendency to use DAOs or repositories for quick CRUD access. It argues that this approach can obscure query design and lead to inefficient patterns such as N+1 queries, while showing how explicit SQL and bulk operations can improve query structure and performance.

### Source excerpt

jOOQ's DAO API is one of jOOQ's most controversial features. When it was first implemented, it was implemented merely: There's a strong hint about the third bullet given how popular Spring Data's repository "pattern" is. A lot of developers just want to quickly fetch and store data, without giving individual queries much thought. A fun ... Continue reading To DAO or not to DAO ->

## Breathing Techniques for Focus and Stress Management in Software Development

DevFeed: [Breathing Techniques for Focus and Stress Management in Software Development](<https://devfeed.tech/articles/your-secret-weapon-for-hyper-focus-34968.md>)

Original publisher: [Read original article](<https://tmsd.substack.com/p/your-secret-weapon-for-hyper-focus>)

Author: Richard Donovan

Published: 2023-11-07T10:22:50Z

Content type: opinion

Language: en

Sources: [The Modern Software Developer](<https://devfeed.tech/sources/the-modern-software-developer.md>)

Topics: [Software](<https://devfeed.tech/topics/software.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [developer](<https://devfeed.tech/tags/developer.md>), [focus](<https://devfeed.tech/tags/focus.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [software-developer](<https://devfeed.tech/tags/software-developer.md>), [stress](<https://devfeed.tech/tags/stress.md>)

### AI overview

This commentary discusses deliberate breathing as a way for software developers to support focus and manage anxiety and stress. It recommends nasal breathing and describes claimed effects on breathing efficiency, oxygen delivery, and sleep-related focus.

### Source excerpt

Hi there, welcome back to The Modern Software Developer.

## Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries

DevFeed: [Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries](<https://devfeed.tech/articles/setting-the-jdbc-statement-setfetchsize-to-1-for-single-row-queries-28959.md>)

Original publisher: [Read original article](<https://blog.jooq.org/setting-the-jdbc-statement-setfetchsize-to-1-for-single-row-queries/>)

Author: lukaseder

Published: 2022-05-11T08:55:41Z

Content type: article

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [db2](<https://devfeed.tech/tags/db2.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [fetch-size](<https://devfeed.tech/tags/fetch-size.md>), [fetchsize](<https://devfeed.tech/tags/fetchsize.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-development](<https://devfeed.tech/tags/jooq-development.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [ojdbc](<https://devfeed.tech/tags/ojdbc.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>)

### AI overview

This article examines whether jOOQ should call JDBC Statement.setFetchSize(1) by default for queries expected to return at most one row. It proposes measuring the effect with a JMH benchmark and discusses limitations on comparing execution speed across RDBMS.

### Source excerpt

An interesting hint by Vladimir Sitnikov has made me think about a new benchmark for jOOQ: The benchmark should check whether single row queries should have a JDBC Statement.setFetchSize(1) call made to them by default. The Javadoc of the method says: Gives the JDBC driver a hint as to the number of rows that should ... Continue reading Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries ->

## Mid-stack inlining in Go

DevFeed: [Mid-stack inlining in Go](<https://devfeed.tech/articles/mid-stack-inlining-in-go-20830.md>)

Original publisher: [Read original article](<https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go>)

Author: Dave Cheney

Published: 2020-05-02T05:09:15Z

Content type: article

Language: en

Sources: [Dave Cheney](<https://devfeed.tech/sources/dave-cheney.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [go](<https://devfeed.tech/tags/go.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This article explains the limits of inlining in Go, comparing leaf and mid-stack inlining. It covers the trade-offs among execution speed, compile time, binary size, optimization opportunities, and the compiler's inlining budget.

### Source excerpt

In the previous post I discussed how leaf inlining allows the Go compiler to reduce the overhead of function calls and extend optimisation opportunities across function boundaries. In this post I'll discuss the limits of inlining and leaf vs mid-stack inlining. The limits of inlining Inlining a function into its caller removes the call's overhead [...]

## Inlining optimisations in Go

DevFeed: [Inlining optimisations in Go](<https://devfeed.tech/articles/inlining-optimisations-in-go-20829.md>)

Original publisher: [Read original article](<https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go>)

Author: Dave Cheney

Published: 2020-04-25T06:38:17Z

Content type: article

Language: en

Sources: [Dave Cheney](<https://devfeed.tech/sources/dave-cheney.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [function](<https://devfeed.tech/tags/function.md>), [go](<https://devfeed.tech/tags/go.md>), [goroutines](<https://devfeed.tech/tags/goroutines.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This article explains how the Go compiler implements function inlining and how the optimization affects Go code. It focuses on gc, the de facto Go compiler from golang.org, while noting that other Go compilers may differ in implementation and effectiveness.

### Source excerpt

This is a post about how the Go compiler implements inlining and how this optimisation affects your Go code. n.b. This article focuses on gc, the de facto Go compiler from golang.org. The concepts discussed apply broadly to other Go compilers like gccgo and tinygo but may differ in implementation and efficacy. What is inlining? [...]

## Optimising Dash.el

DevFeed: [Optimising Dash.el](<https://devfeed.tech/articles/optimising-dash-el-22016.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2017/07/29/optimising-dash-el/>)

Author: Wilfred Hughes

Published: 2017-07-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Library](<https://devfeed.tech/topics/library.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Code](<https://devfeed.tech/topics/code.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [library](<https://devfeed.tech/tags/library.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>)

### AI overview

This tutorial examines performance optimization techniques in Dash.el and Emacs Lisp. It benchmarks iterative code against mapcar, compares wrapper functions, aliases, and primitives, and explains how Emacs byte compilation can improve or eliminate function calls. The article notes that the latest Dash.el version includes these improvements.

### Source excerpt

Dash.el is a lovely library, and one of the most popular on MELPA. If we can squeeze every last drop of performance out of it, everyone benefits. Let's take a look at the black art of making elisp faster. Measure First! Chris Wellons has a great optimisation blog post that discusses the performance overhead of creating lambdas with mapcar. If we look at --map, it does indeed create anonymous functions: (defmacro --map (form list) "Anaphoric form of `-map'." `(mapcar (lambda (it) ,form) ,list)) Creating anonymous functions instantiates a closure, which isn't free. Let's write an iterative equivalent: (defmacro --map-loop (form list) (declare (debug (form form))) (let ((result-sym (make-symbol "result"))) `(let (,result-sym) (dolist (it ,list) (push ,form ,result-sym)) (nreverse ,result-sym)))) List Length mapcar (seconds) dolist (seconds) 1 0.000010 0.000028 1,000 0.0027 0.0079 100,000 0.74 1.24 (Full benchmark code here.) Surprisingly, mapcar is consistently faster in this particular benchmark! Other Emacsers have observed dolist outperforming mapcar for short lists. mapcar is primitive, and primitives tend to be fast. dolist clearly isn't a speedup in all situations. Let's try something else. Matching Primitive Performance Some dash.el functions are equivalent to primitive functions. For example, -first-item is equivalent to car, -drop is equivalent to nthcdr. We could write -first-item like this: (defun -first-item (lst) (car lst)) However, this adds the overhead of an extra function call compared with calling car directly. Instead, dash.el does this: (defalias '-first-item 'car) Let's do a small benchmark, to ensure that defalias giving us the peformance we want: Approach time (seconds) wrapper function 0.1399 alias 0.0055 use car directly 0.0050 (Full benchmark code here.) For shame! Our alias still isn't as fast as using the primitive. Let's compare the disassembly using M-x disassemble. (defalias 'car-alias 'car) (defun use-car-alias (x) (car-alias x)) ;; byte

## Loop unlooping in Javascript

DevFeed: [Loop unlooping in Javascript](<https://devfeed.tech/articles/loop-unlooping-in-javascript-27604.md>)

Original publisher: [Read original article](<https://gagor.pro/2014/01/loop-unlooping-in-javascript/>)

Author: Tom

Published: 2014-01-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Scripting](<https://devfeed.tech/topics/scripting.md>)

Tags: [book](<https://devfeed.tech/tags/book.md>), [examples](<https://devfeed.tech/tags/examples.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [scripting](<https://devfeed.tech/tags/scripting.md>)

### AI overview

This short JavaScript article presents loop unrolling examples, including versions using a switch statement and a version without one. The author considers the second version more readable and notes that the examples could be translated into other scripting languages.

### Source excerpt

Few days ago I've read a book 'Even Faster Web Sites' about websites optimisation and I found one thing usefuluseful, not only on websites. There was a small tip about looploop unlooping. I want to quote them for later use. First - with switch statement var iterations = Math.ceil(values.length / 8); var startAt = values.length % 8; var i = 0; do { switch(startAt) { case 0: process(values[i++]); case 7: process(values[i++]); case 6: process(values[i++]); case 5: process(values[i++]); case 4: process(values[i++]); case 3: process(values[i++]); case 2: process(values[i++]); case 1: process(values[i++]); } startAt = 0; } while(--iterations > 0); Second - without switch var iterations = Math.floor(values.length / 8); var leftover = values.length % 8; var i = 0; if(leftover > 0) { do { process(values[i++]); } while(--leftover > 0); } do { process(values[i++]); process(values[i++]); process(values[i++]); process(values[i++]); process(values[i++]); process(values[i++]); process(values[i++]); process(values[i++]); } while (--iterations > 0); I found second example more readable and I prefer it. These examples after translation could be easily used in other scripting languages.

## Optimizing Integer-to-IP Conversion in Common Lisp

DevFeed: [Optimizing Integer-to-IP Conversion in Common Lisp](<https://devfeed.tech/articles/a-worthwile-micro-optimisation-34521.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2013/10/a-worthwile-micro-optimisation/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2013-10-03T20:10:00Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Common Lisp](<https://devfeed.tech/topics/common-lisp.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [little](<https://devfeed.tech/tags/little.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>)

### AI overview

This article describes a Common Lisp micro-optimization for converting integer values to IP representations while loading geolocation data into PostgreSQL. It precomputes dotted-byte representations at load time, substantially reducing the transformation's added cost.

### Source excerpt

In our previous article about Loading Geolocation Data, we did load some data into PostgreSQL and saw the quite noticable impact of a user transformation. As it happens, the function that did the integer to IP representation was so naive as to scratch the micro optimisation itch of some Common Lisp hackers: thanks a lot guys, in particular stassats who came up with the solution we're seeing now.

## Simplifying LLVM IR for PNaCl

DevFeed: [Simplifying LLVM IR for PNaCl](<https://devfeed.tech/articles/simplifying-llvm-ir-for-pnacl-21564.md>)

Original publisher: [Read original article](<http://lackingrhoticity.blogspot.com/2013/06/simplifying-llvm-ir-for-pnacl.html>)

Author: Mark Seaborn (noreply@blogger.com)

Published: 2013-06-29T19:08:00Z

Content type: article

Language: en

Sources: [Mark Seaborn](<https://devfeed.tech/sources/mark-seaborn.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Web](<https://devfeed.tech/topics/web.md>), [x86](<https://devfeed.tech/topics/x86.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [code](<https://devfeed.tech/tags/code.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [intermediate](<https://devfeed.tech/tags/intermediate.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [native](<https://devfeed.tech/tags/native.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [portable](<https://devfeed.tech/tags/portable.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

This article explains how PNaCl simplifies LLVM IR to create a maintainable, architecture-neutral executable format for native code in web browsers. It describes removing types, names, metadata, and complex instructions, and compares the approach with Emscripten and asm.js.

### Source excerpt

Lately I've been working on Portable Native Client ("PNaCl" for short). Native Client (NaCl) is a sandboxing system that allows safe execution of native code in a web browser -- typically C/C++ code compiled to x86-32, x86-64 or ARM native code (with some support for MIPS too). The problem with NaCl has always been that you have to compile your program multiple times, once for each target architecture. PNaCl aims to solve that, so that your program can be compiled once to an architecture-neutral executable which is then translated to x86 or ARM inside the web browser. PNaCl is based on LLVM, and PNaCl's executable format is based on LLVM's IR ("Intermediate Representation") language and its binary encoding, LLVM bitcode. LLVM's IR language is quite complex, so we're pruning out and expanding out a lot of features in order to ensure that PNaCl will be maintainable in the long term and to reduce executable sizes. As an example, consider this fragment of C code: struct foo { int x; int y; }; void func(struct foo *ptr) { ptr->y = 123; } Normally in LLVM this compiles to the following LLVM assembly code: %struct.foo = type { i32, i32 } define void @func(%struct.foo* nocapture %ptr) #0 { entry: %y = getelementptr inbounds %struct.foo* %ptr, i32 0, i32 1 store i32 123, i32* %y, align 4, !tbaa !0 ret void } attributes #0 = { nounwind } !0 = metadata !{metadata !"int", metadata !1} With PNaCl, we strip out the types, names and metadata so that this becomes: define internal void @67(i32) { %2 = add i32 %0, 4 %3 = inttoptr i32 %2 to i32* store i32 123, i32* %3, align 1 ret void } The definition of the struct type goes away. The "getelementptr" instruction is how LLVM handles pointer arithmetic for indexing into structs and arrays -- this gets expanded out and is replaced with pointer arithmetic on integers. The "%struct.foo*" pointer type is replaced with the i32 type. The "inttoptr" instruction remains as a vestige of LLVM's type system: every "load" or "store" instruction in

## Comparing Python, C, and Common Lisp Performance on a Simple Benchmark

DevFeed: [Comparing Python, C, and Common Lisp Performance on a Simple Benchmark](<https://devfeed.tech/articles/fast-and-stupid-34473.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2012/08/fast-and-stupid/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2012-08-22T14:05:00Z

Content type: opinion

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Common Lisp](<https://devfeed.tech/topics/common-lisp.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [C](<https://devfeed.tech/topics/c.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [c](<https://devfeed.tech/tags/c.md>), [compare](<https://devfeed.tech/tags/compare.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

The article compares Python, C, and Common Lisp implementations of a simple benchmark. It reports that Python is slowest, C is fastest, and Common Lisp falls between them, while discussing the trade-offs of manual optimization and deploying compiled C code from Python.

### Source excerpt

I stumbled onto an interesting article about performance when using python, called Python performance the easy(ish) way, where the author tries to get the bet available performances out of the dumbiest possible python code, trying to solve a very simple and stupid problem. With so many smart qualifiers you can only guess that I did love the challenge. The idea is to write the simplest code possible and see how smarter you need to be when you need perfs. Let's have a try!

## Much improved statement statistics coming to Postgres 9.2

DevFeed: [Much improved statement statistics coming to Postgres 9.2](<https://devfeed.tech/articles/much-improved-statement-statistics-coming-to-postgres-9-2-33642.md>)

Original publisher: [Read original article](<https://pgeoghegan.blogspot.com/2012/03/much-improved-statement-statistics.html>)

Author: Peter Geoghegan (noreply@blogger.com)

Published: 2012-03-29T13:02:00Z

Content type: opinion

Language: en

Sources: [Peter Geoghegan's blog](<https://devfeed.tech/sources/peter-geoghegan-s-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [database](<https://devfeed.tech/tags/database.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pg-stat-statements](<https://devfeed.tech/tags/pg-stat-statements.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>)

### AI overview

This article discusses an improvement to PostgreSQL's pg_stat_statements module for Postgres 9.2. The change normalizes similar queries by fingerprinting analyzed parse-tree fields, allowing statistics from queries that differ only in constants to be grouped together for production performance analysis.

### Source excerpt

There is a tendency for people with an interest in improving databases performance to imagine that it mostly boils down to factors outside of their application - the hardware, operating system configuration, and database settings. While these are obviously crucially important, experience suggests that in most cases, by far the largest gains are to be had by optimising the application's interaction with the database. Doing so invariably involves analysing what queries are being executed in production, their costs, and what the significance of the query is to the application or business process that the database supports. PostgreSQL has had a module available in contrib since version 8.4 - pg_stat_statements, originally developed by Takahiro Itagaki. The module blames execution costs on queries, so that bottlenecks in production can be isolated to points in the application. It does so by providing a view that is continually updated, giving real-time statistical information. Here is an example from the Postgres 9.2 docs: bench=# SELECT pg_stat_statements_reset(); $ pgbench -i bench $ pgbench -c10 -t300 bench bench=# \x bench=# SELECT query, calls, total_time, rows, 100.0 * shared_blks_hit / nullif(shared_blks_hit + shared_blks_read, 0) AS hit_percent FROM pg_stat_statements ORDER BY total_time DESC LIMIT 5; -[ RECORD 1 ]--------------------------------------------------------------------- query | UPDATE pgbench_branches SET bbalance = bbalance + ? WHERE bid = ?; calls | 3000 total_time | 9.60900100000002 rows | 2836 hit_percent | 99.9778970000200936 -[ RECORD 2 ]--------------------------------------------------------------------- query | UPDATE pgbench_tellers SET tbalance = tbalance + ? WHERE tid = ?; calls | 3000 total_time | 8.015156 rows | 2990 hit_percent | 99.9731126579631345 -[ RECORD 3 ]--------------------------------------------------------------------- query | copy pgbench_accounts from stdin calls | 1 total_time | 0.310624 rows | 100000 hit_percent | 0.303