HP 17.3' 17t-by400 Non-Touch Screen Laptop - 11th Gen Intel Core i7-1165G7, 16GB Memory, 1TB SATA Hard Drive, 16GB Intel Optane Memory, DVD-Writer, Windows 10 - Jet Black. Graphics Card: Intel Iris Xe Graphics; WLAN: Realtek Wi-Fi 5 (2x2) and Bluetooth® 5 Combo (MU-MIMO supported) Bluetooth: Bluetooth 5.0. Search term: '4743-17-3' Compare Products: Select up to 4 products.Please select more than one item to compare. 1 match found for 4743-17-3.
This first edition was written for Lua 5.0. While still largely relevant for later versions, there are some differences.
The fourth edition targets Lua 5.3 and is available at Amazon and other bookstores.
By buying the book, you also help to support the Lua project.
Programming in Lua |
Part II. Tables and ObjectsChapter 17. Weak Tables |
17.3 Laptop
17.3 – Revisiting Tables with Default Values
Hp 17.3 Laptop
In Section 13.4.3, we discussed how to implement tables withnon-nil default values.We saw one particular technique and commented that two othertechniques need weak tables so we postponed them.Now it is time to revisit the subject.As we will see, those two techniques for default valuesare actually particular applications of the two generaltechniques that we have seen here:object attributes and memoizing.
Winbond. Winbond Electronics Corporation Specialty Memory IC Company engaged in design, manufacturing and sales services. To customers, Winbond is a unique and valuable supplier. We provides responsive and all-aspects of customer service, steadily paving out the way in offering high-quality products and making life more convenient for people. ─ Sierra Lai/Marketing Director Click to read more. Winbond is currently the largest brand name integrated circuit supplier in Taiwan, and one of the biggest suppliers of semiconductor solutions worldwide. Computer IC, Consumer Electronics IC, and Logic Product Foundry of Winbond product lines have been spun off as Nuvoton Technology Corporation on 1 July 2008. Winbond's W25X and W25Q SpiFlash ® Multi-I/O Memories feature the popular Serial Peripheral Interface (SPI), densities from 512K-bit to 512M-bit, small erasable sectors and the industry's highest performance. The W25X family supports Dual-SPI effectively doubling standard SPI clock rates.
In the first solution,we use a weak table to associate to each table its default value:If defaults
had not weak keys,it would anchor all tables with default values into permanent existence.
In the second solution,we use distinct metatables for distinct default values,but we reuse the same metatable whenever we repeat a default value.This is a typical use of memoizing:We use weak values, in this case,to allow the collection of metatables that are notbeing used anymore.
Given these two implementations for default values,which is best?As usual, it depends.Both have similar complexity and similar performance.The first implementation needs a few words for eachtable with a default value (an entry in defaults
).The second implementation needs a few dozen words foreach distinct default value(a new table, a new closure, plus an entry in metas
).So, if your application has thousands of tables with afew distinct default values,the second implementation is clearly superior.On the other hand, if few tables share common defaults,then you should use the first one.
Copyright © 2003–2004 Roberto Ierusalimschy. All rights reserved. |